Skip to content

Commit 05b935c

Browse files
committed
Simplify session check
1 parent c2b1b08 commit 05b935c

File tree

1 file changed

+1
-2
lines changed
  • src/app/api/items/[unallocatedItemId]/unallocatedItemRequests

1 file changed

+1
-2
lines changed

src/app/api/items/[unallocatedItemId]/unallocatedItemRequests/route.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ export async function GET(
3232
) {
3333
// Validate session
3434
const session = await auth();
35-
if (!session) return authenticationError("Session required");
36-
if (!session?.user) return authenticationError("User not found");
35+
if (!session?.user) return authenticationError("Session required");
3736
if (
3837
session.user.type !== UserType.STAFF &&
3938
session.user.type !== UserType.ADMIN &&

0 commit comments

Comments
 (0)