forked from OrgGo/Tasks
Merge remote-tracking branch 'origin/master'
; Conflicts: ; db/files.go
This commit is contained in:
commit
9b615f894c
|
@ -12,11 +12,7 @@ import (
|
||||||
// AddFile is used to add the md5 of a file name which is uploaded to our application
|
// 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
|
// this will enable us to randomize the URL without worrying about the file names
|
||||||
func AddFile(fileName, token, username string) error {
|
func AddFile(fileName, token, username string) error {
|
||||||
userID, err := GetUserID(username)
|
err := taskQuery("insert into files values(?,?,?,datetime())", fileName, token, username)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = taskQuery("insert into files values(?,?,?,datetime())", fileName, token, userID)
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue