fix: NCWF-1 401 (#5)

Co-authored-by: shahdlala66 <shahd.lala66@gmail.com>
Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de>
Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2026-05-12 23:11:19 +02:00
parent 9ad23b01cc
commit f8f93efff4
+1 -1
View File
@@ -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) {