permanent delete rows

This commit is contained in:
Chris Cromer 2023-02-06 22:33:25 -03:00 committed by Martin Araneda
parent 36f9f0183f
commit 9d23af5579
10 changed files with 10 additions and 10 deletions

View File

@ -138,7 +138,7 @@ func DeleteFrame(writer http.ResponseWriter, request *http.Request, params httpr
return
}
result := gdb.Delete(&frame)
result := gdb.Unscoped().Delete(&frame)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -166,7 +166,7 @@ func DeleteGame(writer http.ResponseWriter, request *http.Request, params httpro
return
}
result := gdb.Delete(&game)
result := gdb.Unscoped().Delete(&game)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -142,7 +142,7 @@ func DeleteGodotVersion(writer http.ResponseWriter, request *http.Request, param
return
}
result := gdb.Delete(&godotVersion)
result := gdb.Unscoped().Delete(&godotVersion)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -134,7 +134,7 @@ func DeleteLevel(writer http.ResponseWriter, request *http.Request, params httpr
return
}
result := gdb.Delete(&level)
result := gdb.Unscoped().Delete(&level)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -140,7 +140,7 @@ func DeleteObject(writer http.ResponseWriter, request *http.Request, params http
return
}
result := gdb.Delete(&object)
result := gdb.Unscoped().Delete(&object)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -134,7 +134,7 @@ func DeleteObjectName(writer http.ResponseWriter, request *http.Request, params
return
}
result := gdb.Delete(&objectName)
result := gdb.Unscoped().Delete(&objectName)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -134,7 +134,7 @@ func DeleteObjectState(writer http.ResponseWriter, request *http.Request, params
return
}
result := gdb.Delete(&objectState)
result := gdb.Unscoped().Delete(&objectState)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -134,7 +134,7 @@ func DeleteOS(writer http.ResponseWriter, request *http.Request, params httprout
return
}
result := gdb.Delete(&os)
result := gdb.Unscoped().Delete(&os)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -136,7 +136,7 @@ func DeletePlayer(writer http.ResponseWriter, request *http.Request, params http
return
}
result := gdb.Delete(&player)
result := gdb.Unscoped().Delete(&player)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return

View File

@ -142,7 +142,7 @@ func DeleteUser(writer http.ResponseWriter, request *http.Request, params httpro
var user models.User
user.ID, _ = strconv.ParseUint(params.ByName("id"), 10, 64)
result := gdb.Delete(&user)
result := gdb.Unscoped().Delete(&user)
if result.Error != nil {
utils.JSONErrorOutput(writer, http.StatusBadRequest, result.Error.Error())
return