Add ability to trigger a save from the ui which whill make the trainer save on the next step

This commit is contained in:
Jaret Burkett
2026-05-26 08:38:49 -06:00
parent 2aa60e4ca5
commit 68e9b38220
6 changed files with 91 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
import { NextRequest, NextResponse } from 'next/server';
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
export async function GET(request: NextRequest, { params }: { params: { jobID: string } }) {
const { jobID } = await params;
const job = await prisma.job.update({
where: { id: jobID },
data: {
save_now: true,
},
});
console.log(`Job ${jobID} marked to save on next step`);
return NextResponse.json(job);
}