File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const workPackagesRouter = express.Router();
88workPackagesRouter . get ( '/' , WorkPackagesController . getAllWorkPackages ) ;
99workPackagesRouter . get (
1010 '/get-many' ,
11- body ( 'wbsNums' ) . exists ( ) . isArray ( ) ,
11+ body ( 'wbsNums' ) . isArray ( ) ,
1212 intMinZero ( body ( 'wbsNums.*.carNumber' ) ) ,
1313 intMinZero ( body ( 'wbsNums.*.projectNumber' ) ) ,
1414 intMinZero ( body ( 'wbsNums.*.workPackageNumber' ) ) ,
Original file line number Diff line number Diff line change @@ -115,14 +115,14 @@ export default class WorkPackagesService {
115115 * @throws if any of the work packages are not found
116116 */
117117 static async getManyWorkPackages ( wbsNums : WbsNumber [ ] ) : Promise < WorkPackage [ ] > {
118- for ( const wbsNum of wbsNums ) {
118+ wbsNums . forEach ( ( wbsNum ) => {
119119 if ( isProject ( wbsNum ) ) {
120120 throw new HttpException (
121121 404 ,
122122 `WBS Number ${ wbsNum . carNumber } .${ wbsNum . projectNumber } .${ wbsNum . workPackageNumber } is a project WBS#, not a Work Package WBS#`
123123 ) ;
124124 }
125- }
125+ } ) ;
126126
127127 const workPackagePromises = wbsNums . map ( async ( wbsNum ) => {
128128 const workPackage = await prisma . work_Package . findFirst ( {
@@ -145,8 +145,6 @@ export default class WorkPackagesService {
145145 ...workPackageQueryArgs
146146 } ) ;
147147
148- console . log ( workPackage ) ;
149-
150148 if ( ! workPackage ) {
151149 throw new NotFoundException ( 'Work Package' , wbsPipe ( wbsNum ) ) ;
152150 }
You can’t perform that action at this time.
0 commit comments