rebuild app as turbopack-first single-stack with internal api and openclaw tasks
This commit is contained in:
16
frontend/app/api/portfolio/insights/generate/route.ts
Normal file
16
frontend/app/api/portfolio/insights/generate/route.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { asErrorMessage, jsonError } from '@/lib/server/http';
|
||||
import { enqueueTask } from '@/lib/server/tasks';
|
||||
|
||||
export async function POST() {
|
||||
try {
|
||||
const task = await enqueueTask({
|
||||
taskType: 'portfolio_insights',
|
||||
payload: {},
|
||||
priority: 70
|
||||
});
|
||||
|
||||
return Response.json({ task });
|
||||
} catch (error) {
|
||||
return jsonError(asErrorMessage(error, 'Failed to queue insights task'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user