Fixed issue with deleting datasets and jobs with newer version of node.js. Bumped minimum version of node js to 20

This commit is contained in:
Jaret Burkett committed 2026-03-25 10:04:36 -06:00
1 parent dfde30f231
commit 5d5a8ef9da
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -16,9 +16,9 @@ export async function POST(request: Request) {
}
// delete it and return success
fs.rmdirSync(datasetPath, { recursive: true });
fs.rmSync(datasetPath, { recursive: true, force: true });
return NextResponse.json({ success: true });
} catch (error) {
return NextResponse.json({ error: 'Failed to create dataset' }, { status: 500 });
return NextResponse.json({ error: 'Failed to delete dataset' }, { status: 500 });
}
}
+1 -1
View File
@@ -21,7 +21,7 @@ export async function GET(request: NextRequest, { params }: { params: { jobID: s
const trainingFolder = path.join(trainingRoot, job.name);
if (fs.existsSync(trainingFolder)) {
fs.rmdirSync(trainingFolder, { recursive: true });
fs.rmSync(trainingFolder, { recursive: true, force: true });
}
await prisma.job.delete({