Skip to content

Commit

Permalink
fix: allow /v1/endpoint access without user settings for new user cre…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
CaramelKat committed Jul 30, 2024
1 parent 9cb644e commit 28ef808
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ async function auth(request: express.Request, response: express.Response, next:

const userSettings = await getUserSettings(request.pid);

if (!userSettings) {
if (!userSettings && request.path === '/v1/endpoint') {
return next();
} else if (!userSettings) {
return badAuth(response, 18, 'BAD_PARAM');
}

Expand Down

0 comments on commit 28ef808

Please sign in to comment.