Add a configuration to disable signing up

This commit is contained in:
2026-02-23 17:59:13 +01:00
parent eba6a279eb
commit 0702a2b0cb
3 changed files with 28 additions and 15 deletions

View File

@@ -46,7 +46,7 @@ func ReturnErrorsAsJsonResponse(ac *appcontext.AppContext, err error) {
if errors.As(err, &ve) {
ac.C.JSON(http.StatusBadRequest, getValidationErrors(ac, &ve))
} else if errors.As(err, &httpError) {
ac.C.JSON(httpError.StatusCode, gin.H{"error": httpError.Err})
ac.C.JSON(httpError.StatusCode, gin.H{"error": httpError.Err.Error()})
} else {
ac.C.JSON(http.StatusInternalServerError, gin.H{"error": err})
}