More unit tests and html coverage report

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

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

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