diff --git a/backend/controllers/frame.go b/backend/controllers/frame.go index 98b1728..20e9b6a 100644 --- a/backend/controllers/frame.go +++ b/backend/controllers/frame.go @@ -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 diff --git a/backend/controllers/game.go b/backend/controllers/game.go index 9735019..1f542de 100644 --- a/backend/controllers/game.go +++ b/backend/controllers/game.go @@ -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 diff --git a/backend/controllers/godot_version.go b/backend/controllers/godot_version.go index 230449a..8222c3f 100644 --- a/backend/controllers/godot_version.go +++ b/backend/controllers/godot_version.go @@ -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 diff --git a/backend/controllers/level.go b/backend/controllers/level.go index d05ffe1..3d19e30 100644 --- a/backend/controllers/level.go +++ b/backend/controllers/level.go @@ -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 diff --git a/backend/controllers/object.go b/backend/controllers/object.go index b45e85d..464379a 100644 --- a/backend/controllers/object.go +++ b/backend/controllers/object.go @@ -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 diff --git a/backend/controllers/object_name.go b/backend/controllers/object_name.go index 07f4e48..5971a87 100644 --- a/backend/controllers/object_name.go +++ b/backend/controllers/object_name.go @@ -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 diff --git a/backend/controllers/object_state.go b/backend/controllers/object_state.go index 2021134..c747e82 100644 --- a/backend/controllers/object_state.go +++ b/backend/controllers/object_state.go @@ -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 diff --git a/backend/controllers/os.go b/backend/controllers/os.go index 6cbce7b..d1710d1 100644 --- a/backend/controllers/os.go +++ b/backend/controllers/os.go @@ -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 diff --git a/backend/controllers/player.go b/backend/controllers/player.go index 6dc7a79..2950939 100644 --- a/backend/controllers/player.go +++ b/backend/controllers/player.go @@ -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 diff --git a/backend/controllers/user.go b/backend/controllers/user.go index e17e089..0c6b724 100644 --- a/backend/controllers/user.go +++ b/backend/controllers/user.go @@ -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