jobs: header running/queued badges + GET /jobs/counts (phase 3d)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,13 @@ pipelineJobsRouter.post('/', async (c) => {
|
||||
return c.json({ jobId, status });
|
||||
});
|
||||
|
||||
// GET /counts — header-badge summary { running, runningJobId, queued }. Before /:id so it isn't
|
||||
// captured as an id.
|
||||
pipelineJobsRouter.get('/counts', async (c) => {
|
||||
const user = c.get('user');
|
||||
return c.json(await jobManager.getCounts(user.id));
|
||||
});
|
||||
|
||||
// GET /:id/log?offset= — tail the persisted output log (script jobs). Returns text from `offset`.
|
||||
pipelineJobsRouter.get('/:id/log', async (c) => {
|
||||
const user = c.get('user');
|
||||
|
||||
Reference in New Issue
Block a user