Skip to content

Commit

Permalink
fix: correct api token length check (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
anbraten authored Jan 20, 2023
1 parent 9dbf8ce commit e295ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/api/endpoints/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function projectEndpoints(server: FastifyInstance): void {
});

const apiToken = body.apiToken || (await generateApiToken());
if (apiToken.length >= 32) {
if (apiToken.length < 32) {
return reply.code(400).send({ error: 'Api token must be at least 32 characters long' });
}

Expand Down

0 comments on commit e295ae4

Please sign in to comment.