Skip to content

Commit

Permalink
types: fix typecheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Oct 1, 2024
1 parent 2028277 commit 8b88bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function checkProject(event: H3Event, projectId: Project['id']) {
},
}).catch((err) => { throw createPrismaError(err) })

if (!compareSync(apiKey, project.apiKey)) {
if (!project.apiKey || !compareSync(apiKey, project.apiKey)) {
throw createUnauthorizedError()
}

Expand Down

0 comments on commit 8b88bb8

Please sign in to comment.