Skip to content

Commit 8b88bb8

Browse files
committed
types: fix typecheck issues
1 parent 2028277 commit 8b88bb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/utils/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function checkProject(event: H3Event, projectId: Project['id']) {
4848
},
4949
}).catch((err) => { throw createPrismaError(err) })
5050

51-
if (!compareSync(apiKey, project.apiKey)) {
51+
if (!project.apiKey || !compareSync(apiKey, project.apiKey)) {
5252
throw createUnauthorizedError()
5353
}
5454

0 commit comments

Comments
 (0)