From f8f93efff48f1d7198023fed45b675c2e225df36 Mon Sep 17 00:00:00 2001 From: Shahd Lala Date: Tue, 12 May 2026 23:11:19 +0200 Subject: [PATCH] fix: NCWF-1 401 (#5) Co-authored-by: shahdlala66 Co-authored-by: Lala, Shahd Reviewed-on: https://git.janis-eccarius.de/NowChess/NowChess-Frontend/pulls/5 --- src/app/services/auth.interceptor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/auth.interceptor.ts b/src/app/services/auth.interceptor.ts index c878833..673722e 100644 --- a/src/app/services/auth.interceptor.ts +++ b/src/app/services/auth.interceptor.ts @@ -3,11 +3,11 @@ import { HttpInterceptorFn } from '@angular/common/http'; export const authInterceptor: HttpInterceptorFn = (req, next) => { const token = localStorage.getItem('token'); - // Add token to protected endpoints only (not registration or login) const isProtectedEndpoint = req.url.includes('/api/account/me') || req.url.includes('/api/account/bots') || req.url.includes('/api/account/official-bots') || + req.url.includes('/api/board/game') || req.url.includes('/api/challenge'); if (token && isProtectedEndpoint) {