Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fnLog0 committed Sep 16, 2024
1 parent 608c0bc commit d62886c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/server/src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ export function withAuthGuard<T, S, V>(
) {
return function (_: T, args: S, context: Context) {
if (!context.profileId) {
throw new Error("Unauthorized");
if (!context.spaceId) {
throw new Error("Please provide a valid API key");
} else {
throw new Error("Unauthorized");
}
}

const authContext = {
Expand Down

0 comments on commit d62886c

Please sign in to comment.