Skip to content

Commit

Permalink
[Feat] : Organizations module #68 [Feat] : Add organization select fi…
Browse files Browse the repository at this point in the history
…eld to advancedResult in bootcamp.ts
  • Loading branch information
ballyalley-o committed May 4, 2024
1 parent 630f110 commit 14b7a30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/constant/enum/key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ enum Key {

CourseSelect = 'name description',
DefaultSelect = 'name description',
OrganizationSelect = 'firstname email organization',
PasswordSelect = '-password',
BootcampPopulate = 'firstname email',

Expand Down
8 changes: 7 additions & 1 deletion src/route/bootcamp/bootcamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ router.use(PathParam.REDIR_FEEDBACK, feedbackRoute)
router.route(PathParam.DISTANCE).get(bootcampController.getBootcampsInRadius)
router
.route(PathParam.F_SLASH)
.get(advancedResult(Bootcamp, Key.UserVirtual), bootcampController.getBootcamps)
.get(
advancedResult(Bootcamp, {
path: Key.UserVirtual,
select: Key.OrganizationSelect
}),
bootcampController.getBootcamps
)
.post(bootcampController.createBootcamp)
router.route(PathParam.CREATE).post(protect, authorize(Key.Trainer, Key.Admin), bootcampController.createBootcamp)
router
Expand Down

0 comments on commit 14b7a30

Please sign in to comment.