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:
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user