@@ -7,18 +7,18 @@ export default class ChangeRequestsController {
77 const { crId } = req . params ;
88
99 const cr = await ChangeRequestsService . getChangeRequestByID ( crId , req . organization ) ;
10- return res . status ( 200 ) . json ( cr ) ;
10+ res . status ( 200 ) . json ( cr ) ;
1111 } catch ( error : unknown ) {
12- return next ( error ) ;
12+ next ( error ) ;
1313 }
1414 }
1515
1616 static async getAllChangeRequests ( req : Request , res : Response , next : NextFunction ) {
1717 try {
1818 const changeRequests = await ChangeRequestsService . getAllChangeRequests ( req . organization ) ;
19- return res . status ( 200 ) . json ( changeRequests ) ;
19+ res . status ( 200 ) . json ( changeRequests ) ;
2020 } catch ( error : unknown ) {
21- return next ( error ) ;
21+ next ( error ) ;
2222 }
2323 }
2424
@@ -33,9 +33,9 @@ export default class ChangeRequestsController {
3333 req . organization ,
3434 psId
3535 ) ;
36- return res . status ( 200 ) . json ( { message : `Change request #${ id } successfully reviewed.` } ) ;
36+ res . status ( 200 ) . json ( { message : `Change request #${ id } successfully reviewed.` } ) ;
3737 } catch ( error : unknown ) {
38- return next ( error ) ;
38+ next ( error ) ;
3939 }
4040 }
4141
@@ -55,9 +55,9 @@ export default class ChangeRequestsController {
5555 confirmDetails ,
5656 req . organization
5757 ) ;
58- return res . status ( 200 ) . json ( { message : `Successfully created activation change request with id #${ id } ` } ) ;
58+ res . status ( 200 ) . json ( { message : `Successfully created activation change request with id #${ id } ` } ) ;
5959 } catch ( error : unknown ) {
60- return next ( error ) ;
60+ next ( error ) ;
6161 }
6262 }
6363
@@ -73,9 +73,9 @@ export default class ChangeRequestsController {
7373 confirmDone ,
7474 req . organization
7575 ) ;
76- return res . status ( 200 ) . json ( { message : `Successfully created stage gate request with id #${ id } ` } ) ;
76+ res . status ( 200 ) . json ( { message : `Successfully created stage gate request with id #${ id } ` } ) ;
7777 } catch ( error : unknown ) {
78- return next ( error ) ;
78+ next ( error ) ;
7979 }
8080 }
8181
@@ -99,9 +99,9 @@ export default class ChangeRequestsController {
9999 projectProposedChanges ,
100100 workPackageProposedChanges
101101 ) ;
102- return res . status ( 200 ) . json ( createdCR ) ;
102+ res . status ( 200 ) . json ( createdCR ) ;
103103 } catch ( error : unknown ) {
104- return next ( error ) ;
104+ next ( error ) ;
105105 }
106106 }
107107
@@ -117,9 +117,9 @@ export default class ChangeRequestsController {
117117 scopeImpact ,
118118 req . organization
119119 ) ;
120- return res . status ( 200 ) . json ( { message : `Successfully added proposed solution with id #${ id } ` } ) ;
120+ res . status ( 200 ) . json ( { message : `Successfully added proposed solution with id #${ id } ` } ) ;
121121 } catch ( error : unknown ) {
122- return next ( error ) ;
122+ next ( error ) ;
123123 }
124124 }
125125
@@ -128,9 +128,9 @@ export default class ChangeRequestsController {
128128 const { crId } = req . params ;
129129
130130 await ChangeRequestsService . deleteChangeRequest ( req . currentUser , crId , req . organization ) ;
131- return res . status ( 200 ) . json ( { message : `Successfully deleted change request #${ crId } ` } ) ;
131+ res . status ( 200 ) . json ( { message : `Successfully deleted change request #${ crId } ` } ) ;
132132 } catch ( error : unknown ) {
133- return next ( error ) ;
133+ next ( error ) ;
134134 }
135135 }
136136
@@ -140,9 +140,9 @@ export default class ChangeRequestsController {
140140 const { crId } = req . params ;
141141
142142 await ChangeRequestsService . requestCRReview ( req . currentUser , userIds , crId , req . organization ) ;
143- return res . status ( 200 ) . json ( { message : `Successfully requested reviewer(s) to change request #${ crId } ` } ) ;
143+ res . status ( 200 ) . json ( { message : `Successfully requested reviewer(s) to change request #${ crId } ` } ) ;
144144 } catch ( error : unknown ) {
145- return next ( error ) ;
145+ next ( error ) ;
146146 }
147147 }
148148}
0 commit comments