flatten app to repo root and update docker deployment for single-stack runtime
This commit is contained in:
16
app/api/portfolio/refresh-prices/route.ts
Normal file
16
app/api/portfolio/refresh-prices/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: 'refresh_prices',
|
||||
payload: {},
|
||||
priority: 80
|
||||
});
|
||||
|
||||
return Response.json({ task });
|
||||
} catch (error) {
|
||||
return jsonError(asErrorMessage(error, 'Failed to queue refresh task'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user