@@ -15,7 +15,12 @@ router.post('/wizard', async (req, res) => {
1515 try {
1616 const { repoUrl, provider, branch } = req . body ;
1717 if ( ! repoUrl || ! provider || ! branch ) {
18- return res . status ( 400 ) . json ( { success : false , error : 'Missing required fields: repoUrl, provider, branch' } ) ;
18+ return res
19+ . status ( 400 )
20+ . json ( {
21+ success : false ,
22+ error : 'Missing required fields: repoUrl, provider, branch' ,
23+ } ) ;
1924 }
2025 const result = await runWizardAgent ( { repoUrl, provider, branch } ) ;
2126 res . json ( { success : true , data : result } ) ;
@@ -30,12 +35,14 @@ router.post('/pipeline', async (req, res) => {
3035 try {
3136 const { repoUrl } = req . body ;
3237 if ( ! repoUrl ) {
33- return res . status ( 400 ) . json ( { success : false , error : 'Missing required field: repoUrl' } ) ;
38+ return res
39+ . status ( 400 )
40+ . json ( { success : false , error : 'Missing required field: repoUrl' } ) ;
3441 }
3542 const yaml = await pipeline_generator . handler ( {
3643 repo : repoUrl ,
3744 provider : 'aws' ,
38- template : 'node_app'
45+ template : 'node_app' ,
3946 } ) ;
4047 res . json ( { success : true , data : yaml } ) ;
4148 } catch ( err ) {
@@ -48,7 +55,9 @@ router.post('/analyze', async (req, res) => {
4855 try {
4956 const { repoUrl } = req . body ;
5057 if ( ! repoUrl ) {
51- return res . status ( 400 ) . json ( { success : false , error : 'Missing required field: repoUrl' } ) ;
58+ return res
59+ . status ( 400 )
60+ . json ( { success : false , error : 'Missing required field: repoUrl' } ) ;
5261 }
5362 const summary = await repo_reader . handler ( { repo : repoUrl } ) ;
5463 res . json ( { success : true , data : summary } ) ;
@@ -62,7 +71,9 @@ router.post('/deploy', async (req, res) => {
6271 try {
6372 const { provider } = req . body ;
6473 if ( ! provider ) {
65- return res . status ( 400 ) . json ( { success : false , error : 'Missing required field: provider' } ) ;
74+ return res
75+ . status ( 400 )
76+ . json ( { success : false , error : 'Missing required field: provider' } ) ;
6677 }
6778 const deployLog = await oidc_adapter . handler ( { provider } ) ;
6879 res . json ( { success : true , data : deployLog } ) ;
@@ -76,4 +87,4 @@ router.get('/status', (_req, res) => {
7687 res . json ( { success : true , data : { ok : true , uptime : process . uptime ( ) } } ) ;
7788} ) ;
7889
79- export default router ;
90+ export default router ;
0 commit comments