Fix MySQL syntax error

This commit is contained in:
2024-04-28 22:57:01 +07:00
parent e6344743d5
commit 994b1faacf
2 changed files with 3 additions and 3 deletions

View File

@ -211,13 +211,13 @@ func (db *mySQLdb) GetUploadInfo(fileID string) (*models.FilesUploaded, error) {
}
func (db *mySQLdb) UpdateUpdateIndex(index int, fileID string) {
db.DB.Table("files_uploadeds").Where("file_id = $1", fileID).Updates(map[string]interface{}{
db.DB.Table("files_uploadeds").Where("file_id = ?", fileID).Updates(map[string]interface{}{
"Uploaded": index,
})
}
func (db *mySQLdb) FinalizeFileUpload(fileID string) {
db.DB.Table("files_uploadeds").Where("file_id = $1", fileID).Updates(map[string]interface{}{
db.DB.Table("files_uploadeds").Where("file_id = ?", fileID).Updates(map[string]interface{}{
"Done": true,
})
}