mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
19 lines
579 B
TypeScript
19 lines
579 B
TypeScript
/**
|
|
* GET /status endpoint - Get backlog plan generation status
|
|
*/
|
|
|
|
import type { Request, Response } from 'express';
|
|
import { getBacklogPlanStatus, getErrorMessage, logError } from '../common.js';
|
|
|
|
export function createStatusHandler() {
|
|
return async (_req: Request, res: Response): Promise<void> => {
|
|
try {
|
|
const status = getBacklogPlanStatus();
|
|
res.json({ success: true, ...status });
|
|
} catch (error) {
|
|
logError(error, 'Get backlog plan status failed');
|
|
res.status(500).json({ success: false, error: getErrorMessage(error) });
|
|
}
|
|
};
|
|
}
|