Merge remote-tracking branch 'origin/master'

; Conflicts:
;	db/files.go
This commit is contained in:
Christian Huff 2016-05-17 09:42:26 +01:00
commit 9b615f894c
1 changed files with 1 additions and 5 deletions

View File

@ -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
}