mirror of
https://github.com/multipleof4/KalBot.git
synced 2026-03-17 14:01:02 +00:00
Feat: Add paper trading reset endpoint
This commit is contained in:
12
app/api/reset/route.js
Normal file
12
app/api/reset/route.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import fs from 'fs';
|
||||
|
||||
export async function POST() {
|
||||
try {
|
||||
// Write a flag file that the worker polls for
|
||||
fs.writeFileSync('/tmp/kalbot-reset-flag', 'reset');
|
||||
return NextResponse.json({ success: true, message: 'Reset signal sent. Data will clear momentarily.' });
|
||||
} catch (e) {
|
||||
return NextResponse.json({ error: e.message }, { status: 500 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user