fix(web): allow public invite info fetches

This commit is contained in:
Aleksas Pielikis 2026-03-12 18:38:09 +02:00
parent a818c3b4d0
commit 64a9ad1f22

View file

@ -91,7 +91,8 @@ class BaseApiService {
// Validate the bearer token
const isNoAuthEndpoint =
this.noAuthEndpoints.includes(url) ||
this.noAuthPrefixes.some((prefix) => url.startsWith(prefix));
this.noAuthPrefixes.some((prefix) => url.startsWith(prefix)) ||
/^\/api\/v1\/invites\/[^/]+\/info$/.test(url);
if (!this.bearerToken && !isNoAuthEndpoint) {
throw new AuthenticationError("You are not authenticated. Please login again.");
}