Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#170720630 Assign a requester to a manager #55

Merged
merged 2 commits into from
Jan 23, 2020

Conversation

gadishimwe
Copy link
Contributor

What does this PR do?

Add assigning requester to a manager feature

Description of Task to be completed?

  • Add assigning a user to a manager controller
  • Add assign manager validations
  • Add tests and documentation of this Feature

How should this be manually tested?

$ git clone https://github.com/andela/the_spinners-backend.git
$ cd the_spinners-backend
$ git checkout  ft-assign-requester-to-manager-170720630

then
$ npm run test

or you can use Postman to send a request to /api/users/settings/:userId/line-manager/:lineManagerId

What are the relevant pivotal tracker stories?

#170720630

Screenshots

Screen Shot 2020-01-20 at 15 21 16

Screen Shot 2020-01-20 at 15 21 38


const router = express.Router();

router.patch('/roles', authMiddleware.checkUserLoggedIn, validateUserRole, authMiddleware.verifyIfUserIsAdmin, SettingsController.changeUserRole);
router.patch('/:userId/line-manager/:lineManagerId', authMiddleware.checkUserLoggedIn, authMiddleware.verifyIfUserIsAdmin, assignManagerValidation, SettingsController.assignRequesterToManager);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This route would be correct if a user can have many managers since it is not the case, I suggest you use a convenient route.

src/tests/settings/settings.test.js Show resolved Hide resolved
@gadishimwe gadishimwe force-pushed the ft-assign-requester-to-manager-170720630 branch from c0d042a to 674ca90 Compare January 23, 2020 12:29
- Add assigning user to a manager controller
- Add assign manager validations
- Add tests and documentation of this Feature

[starts #170720630]
@gadishimwe gadishimwe force-pushed the ft-assign-requester-to-manager-170720630 branch from 674ca90 to cf54484 Compare January 23, 2020 12:30
@bdushimi bdushimi merged commit a3d6dde into develop Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants