Show actual operations execution and history
This commit is contained in:
@@ -154,6 +154,7 @@ export function createApp(options = process.env) {
|
||||
}
|
||||
if (route.startsWith('/api/')) {
|
||||
if (!session(req)) return json(res, 401, { error: '请先登录' });
|
||||
if (req.method === 'GET' && route === '/api/execution') return json(res, 200, await jsonFile('ops-status.json', { schema: 1, observed_at: null, units: [], running_tasks: [], history: [] }));
|
||||
if (req.method === 'GET' && route === '/api/overview') {
|
||||
const strategy = await jsonFile('ops-strategy.json', {}), market = await jsonFile('market-latest.json', {});
|
||||
const short = (v, n = 300) => typeof v === 'string' ? v.slice(0, n) : '';
|
||||
|
||||
Reference in New Issue
Block a user