More unit tests and html coverage report

also fixes a limit bug on listquery
This commit is contained in:
Jamie Curnow committed 2023-07-27 12:38:35 +10:00
1 parent e4e70ae6be
commit 9faa36315f
19 files changed
+479 -183

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ func Enforce(permission string) func(http.Handler) http.Handler {
}
userID := uint(claims["uid"].(float64))
_, enabled := user.IsEnabled(userID)
_, enabled, _ := user.IsEnabled(userID)
if token == nil || !enabled {
h.ResultErrorJSON(w, r, http.StatusUnauthorized, "Unauthorised", nil)
return
+1 -1
View File
@@ -32,7 +32,7 @@ func SSEAuth(next http.Handler) http.Handler {
}
userID := uint(claims["uid"].(float64))
_, enabled := user.IsEnabled(userID)
_, enabled, _ := user.IsEnabled(userID)
if token == nil || !enabled {
h.ResultErrorJSON(w, r, http.StatusUnauthorized, "Unauthorised", nil)
return