feat(backend): update admin settings and test infrastructure

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-18 16:26:12 +01:00
co-authored by Sisyphus
parent f689202984
commit 3582965492
6 changed files with 19 additions and 20 deletions
+2 -2
View File
@@ -107,7 +107,7 @@ func CreatePatchTest(w http.ResponseWriter, r *http.Request) {
func UpdatePatchTest(w http.ResponseWriter, r *http.Request) { func UpdatePatchTest(w http.ResponseWriter, r *http.Request) {
id := chi.URLParam(r, "id") id := chi.URLParam(r, "id")
if id == "" || !validators.IsValidID(id) { if id == "" || !validators.IsValidID(id) {
http.Error(w, "Patch test not found (ID: " + id + ")", http.StatusNotFound) http.Error(w, "Patch test not found", http.StatusNotFound)
return return
} }
@@ -158,7 +158,7 @@ func UpdatePatchTest(w http.ResponseWriter, r *http.Request) {
_, err := db.DB.Exec(r.Context(), query, args...) _, err := db.DB.Exec(r.Context(), query, args...)
if err != nil { if err != nil {
http.Error(w, "Failed to update patch test: " + err.Error() + " Query: " + query, http.StatusInternalServerError) http.Error(w, "Failed to update patch test", http.StatusInternalServerError)
return return
} }
@@ -11,7 +11,6 @@ import (
"crussell/testutils/fixtures" "crussell/testutils/fixtures"
) )
func TestPatchTests_CRUD(t *testing.T) { func TestPatchTests_CRUD(t *testing.T) {
resetTestData(t) resetTestData(t)
+1 -1
View File
@@ -8,8 +8,8 @@ import (
"testing" "testing"
"crussell/db" "crussell/db"
"crussell/testutils/testdb"
"crussell/testutils/jwt" "crussell/testutils/jwt"
"crussell/testutils/testdb"
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {