rebuild app as turbopack-first single-stack with internal api and openclaw tasks
This commit is contained in:
16
frontend/app/api/health/route.ts
Normal file
16
frontend/app/api/health/route.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { getStoreSnapshot } from '@/lib/server/store';
|
||||
|
||||
export async function GET() {
|
||||
const snapshot = await getStoreSnapshot();
|
||||
const queue = snapshot.tasks.reduce<Record<string, number>>((acc, task) => {
|
||||
acc[task.status] = (acc[task.status] ?? 0) + 1;
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
return Response.json({
|
||||
status: 'ok',
|
||||
version: '3.0.0',
|
||||
timestamp: new Date().toISOString(),
|
||||
queue
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user