mirror of
https://github.com/ddworken/hishtory.git
synced 2024-12-24 15:58:52 +01:00
Fix typo in SQL query
This commit is contained in:
parent
41f82e8034
commit
a2f95fdc4d
@ -114,6 +114,8 @@ func apiQueryHandler(w http.ResponseWriter, r *http.Request) {
|
||||
panic(result.Error)
|
||||
}
|
||||
|
||||
// Delete any entries that match a pending deletion request
|
||||
|
||||
// Then retrieve, to avoid a race condition
|
||||
tx := GLOBAL_DB.Where("device_id = ? AND read_count < 5", deviceId)
|
||||
var historyEntries []*shared.EncHistoryEntry
|
||||
@ -212,7 +214,7 @@ func getDeletionRequestsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
deviceId := getRequiredQueryParam(r, "device_id")
|
||||
|
||||
// Increment the ReadCount
|
||||
result := GLOBAL_DB.Exec("UPDATE deletion_requesy SET read_count = read_count + 1 WHERE destination_device_id = ? AND user_id = ?", deviceId, userId)
|
||||
result := GLOBAL_DB.Exec("UPDATE deletion_requests SET read_count = read_count + 1 WHERE destination_device_id = ? AND user_id = ?", deviceId, userId)
|
||||
if result.Error != nil {
|
||||
panic(result.Error)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user