Skip to content

Conversation

@cvjude
Copy link
Collaborator

@cvjude cvjude commented Jun 12, 2019

What does this PR do?
Creates endpoints for the superAdmin to create, delete and get users

Description of Task to be completed?

  • Create an endpoint to for a super admin to create users
  • create an endpoint for Super delete users
  • create an endpoint for superAdmin to get all users or a single user

How should this be manually tested?

Clone the repo and run npm install to download all packages, then use npm run test to test the endpoint, POSTMAN can also be used to test.

Any background context you want to provide?

None

What are the relevant pivotal tracker stories?

#166265859

Screenshots (if appropriate)

None

@cvjude cvjude force-pushed the ft-superadmin-add-users-166265859 branch from c79c020 to 4c6c9e1 Compare June 12, 2019 05:25
@coveralls
Copy link

coveralls commented Jun 12, 2019

Coverage Status

Coverage increased (+1.0%) to 91.883% when pulling 6b07a8d on ft-superadmin-add-users-166265859 into ab6b0ac on develop.

* @returns {object} Json
* @memberof Controllers
*/
static async user(req, res, next) {
Copy link
Owner

Choose a reason for hiding this comment

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

The previous name is more descriptive. Please reverse to that

signupMethod
};
} else {
const theUser = await models.Users.findAll();
Copy link
Owner

Choose a reason for hiding this comment

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

You do not need to map through the objects to pick what you want. You can get that done from the query.
eg:

Project.find({
  attributes: ['id', 'name', 'title']
})

- Create an endpoint to for a super admin to create users
- create an endpoint for Super delete users
- create an endpoint for superAdmin to get all users or a single user

[Delivers #166265859]
@cvjude cvjude force-pushed the ft-superadmin-add-users-166265859 branch from 4c6c9e1 to 6b07a8d Compare June 12, 2019 06:59
@cvjude cvjude requested review from emp-daisy and encodedBicoding and removed request for emp-daisy June 12, 2019 07:04
@emp-daisy emp-daisy merged commit 7286061 into develop Jun 12, 2019
@emp-daisy emp-daisy deleted the ft-superadmin-add-users-166265859 branch June 12, 2019 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants