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
2026-03-25 10:04:36 -06:00
parent dfde30f231
commit 5d5a8ef9da
3 changed files with 4 additions and 4 deletions

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 });
}
}