diff --git a/apps/web/app/api/employee/working/route.ts b/apps/web/app/api/employee/working/route.ts index be5643a38..061206e17 100644 --- a/apps/web/app/api/employee/working/route.ts +++ b/apps/web/app/api/employee/working/route.ts @@ -5,9 +5,12 @@ import { NextResponse } from 'next/server'; export async function GET(req: Request) { const res = new NextResponse(); const { $res, user, access_token, tenantId, organizationId } = await authenticatedGuard(req, res); - if (!user) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); + + if (!user) { + return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); + } const { data } = await getOrganizationEmployees(access_token, tenantId, organizationId); - $res(data); + return $res(data); } diff --git a/apps/web/app/api/invite/emails/route.ts b/apps/web/app/api/invite/emails/route.ts index 0afd5221b..3366f6d1b 100644 --- a/apps/web/app/api/invite/emails/route.ts +++ b/apps/web/app/api/invite/emails/route.ts @@ -65,5 +65,5 @@ export async function POST(req: Request) { access_token ); - $res(data); + return $res(data); } diff --git a/apps/web/app/api/invite/resend/route.ts b/apps/web/app/api/invite/resend/route.ts index 38887c4d8..ba9c6ffca 100644 --- a/apps/web/app/api/invite/resend/route.ts +++ b/apps/web/app/api/invite/resend/route.ts @@ -32,5 +32,5 @@ export async function POST(req: Request) { access_token ); - $res(data); + return $res(data); } diff --git a/apps/web/app/api/invite/validate-by-code/route.ts b/apps/web/app/api/invite/validate-by-code/route.ts index 5338481c2..304b79aff 100644 --- a/apps/web/app/api/invite/validate-by-code/route.ts +++ b/apps/web/app/api/invite/validate-by-code/route.ts @@ -15,5 +15,5 @@ export async function POST(req: Request) { const { data } = await verifyInviteCodeRequest(body); - NextResponse.json(data, { status: 200 }); + return NextResponse.json(data, { status: 200 }); } diff --git a/apps/web/app/api/organization-projects/setting/[id]/route.ts b/apps/web/app/api/organization-projects/setting/[id]/route.ts index ab96a8a0c..aefab205f 100644 --- a/apps/web/app/api/organization-projects/setting/[id]/route.ts +++ b/apps/web/app/api/organization-projects/setting/[id]/route.ts @@ -12,7 +12,10 @@ export async function PUT(req: Request, { params }: INextParams) { } const { $res, user, access_token, tenantId } = await authenticatedGuard(req, res); - if (!user) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); + + if (!user) { + return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); + } const body = await req.json(); @@ -23,5 +26,5 @@ export async function PUT(req: Request, { params }: INextParams) { tenantId }); - $res(response.data); + return $res(response.data); }