add logging for failed auth
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user