Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
Add auth to export route
Khuram Niaz8a4a530a11ef
diff --git a/src/app/api/jobs/export/route.ts b/src/app/api/jobs/export/route.tsindex 04dc2f6..1f0da79 100644--- a/src/app/api/jobs/export/route.ts+++ b/src/app/api/jobs/export/route.ts@@ -3,6 +3,7 @@ import Papa from "papaparse";import { PassThrough } from "node:stream";import { getJobsIterator } from "@/actions/job.actions";import { format } from "date-fns";+import { auth } from "@/auth";const FIELDS: string[] = ["index",@@ -57,6 +58,11 @@ const transformJobData = (};export const POST = async () => {+ const session = await auth();+ if (!session) {+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });+ }+const passThrough = new PassThrough();let isFirstChunk = true;let hasError = false;