diff --git a/db/files.go b/db/files.go index 44a3bd8..90eaabe 100644 --- a/db/files.go +++ b/db/files.go @@ -12,11 +12,7 @@ import ( // AddFile is used to add the md5 of a file name which is uploaded to our application // this will enable us to randomize the URL without worrying about the file names func AddFile(fileName, token, username string) error { - userID, err := GetUserID(username) - if err != nil { - return err - } - err = taskQuery("insert into files values(?,?,?,datetime())", fileName, token, userID) + err := taskQuery("insert into files values(?,?,?,datetime())", fileName, token, username) return err }