added a bit of zap logging
Some checks failed
Build and Push Docker Image / Build image (push) Failing after 58s

This commit is contained in:
2025-04-09 20:03:34 +03:00
parent 29d13371a8
commit 54174ef418
8 changed files with 58 additions and 14 deletions

View File

@@ -116,6 +116,11 @@ func (con AuthApi) signUp(ctx *gin.Context) {
return
}
err = con.tokenHandler.DeleteInviteToken(ctx, token.Token)
if err != nil {
log.Printf("Failed to delete token %s", err)
}
con.signIn(ctx)
}

View File

@@ -13,7 +13,7 @@ func AuthorizedTo(requiredPermissions models.Permission) gin.HandlerFunc {
return func(ctx *gin.Context) {
claimsPointer, exists := ctx.Get("claims")
if !exists {
ctx.AbortWithError(500, fmt.Errorf("Did not call LoggedIn first"))
ctx.AbortWithError(500, fmt.Errorf("did not call LoggedIn first"))
return
}
@@ -41,6 +41,5 @@ func AuthorizationEnforcer() gin.HandlerFunc {
if !authorized.(bool) {
ctx.AbortWithStatus(403)
}
}
}