mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-19 22:53:08 +00:00
- Delete the 2705-line auto-mode-service.ts monolith - Create AutoModeServiceCompat as compatibility layer for routes - Create GlobalAutoModeService for cross-project operations - Update all routes to use AutoModeServiceCompat type - Add SharedServices interface for state sharing across facades - Add getActiveProjects/getActiveWorktrees to AutoLoopCoordinator - Delete obsolete monolith test files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
1014 B
TypeScript
33 lines
1014 B
TypeScript
/**
|
|
* POST /verify-feature endpoint - Verify a feature
|
|
*/
|
|
|
|
import type { Request, Response } from 'express';
|
|
import type { AutoModeServiceCompat } from '../../../services/auto-mode/index.js';
|
|
import { getErrorMessage, logError } from '../common.js';
|
|
|
|
export function createVerifyFeatureHandler(autoModeService: AutoModeServiceCompat) {
|
|
return async (req: Request, res: Response): Promise<void> => {
|
|
try {
|
|
const { projectPath, featureId } = req.body as {
|
|
projectPath: string;
|
|
featureId: string;
|
|
};
|
|
|
|
if (!projectPath || !featureId) {
|
|
res.status(400).json({
|
|
success: false,
|
|
error: 'projectPath and featureId are required',
|
|
});
|
|
return;
|
|
}
|
|
|
|
const passes = await autoModeService.verifyFeature(projectPath, featureId);
|
|
res.json({ success: true, passes });
|
|
} catch (error) {
|
|
logError(error, 'Verify feature failed');
|
|
res.status(500).json({ success: false, error: getErrorMessage(error) });
|
|
}
|
|
};
|
|
}
|