add logging for failed auth
All checks were successful
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 1m15s

This commit is contained in:
Tim
2024-07-30 09:30:56 +02:00
parent 95e89b8947
commit 5883fc0c3a

View File

@@ -4,6 +4,7 @@ import (
"api/src/utils"
"context"
"log"
"net/http"
)
@@ -23,6 +24,7 @@ func EnsureAuth(next http.Handler) http.Handler {
token, err := utils.VerifyToken(tokenStr)
if err != nil {
log.Println(err)
http.Error(w, "Unauthorized", http.StatusUnauthorized)
return
}