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:
@@ -107,7 +107,7 @@ func CreatePatchTest(w http.ResponseWriter, r *http.Request) {
|
||||
func UpdatePatchTest(w http.ResponseWriter, r *http.Request) {
|
||||
id := chi.URLParam(r, "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
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ func UpdatePatchTest(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
_, err := db.DB.Exec(r.Context(), query, args...)
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"crussell/testutils/fixtures"
|
||||
)
|
||||
|
||||
|
||||
func TestPatchTests_CRUD(t *testing.T) {
|
||||
resetTestData(t)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"crussell/db"
|
||||
"crussell/testutils/testdb"
|
||||
"crussell/testutils/jwt"
|
||||
"crussell/testutils/testdb"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
||||
Reference in New Issue
Block a user