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

#168256011 Refactor code to improve the maintainability #59

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

nkalyesubula
Copy link
Contributor

@nkalyesubula nkalyesubula commented Sep 6, 2019

What does this PR do?

  • Improves code maintainability

Description of Task to be completed?

  • This is meant to remove all duplicates , add JSDoc comments to all classes and methods and ensure that all modules make use of util helper functions.

How should this be manually tested?

  • Check on the provided screenshoot below

Any background context you want to provide?

  • Improvement of Maintainability from C(3 weeks) to Maintainability of B (4hrs)

What are the relevant pivotal tracker stories?

#168256011

Screenshots (if appropriate)

image

@salviosage salviosage temporarily deployed to codepirates-ah-backend-pr-59 September 6, 2019 13:51 Inactive
@nkalyesubula nkalyesubula temporarily deployed to codepirates-ah-backend-pr-59 September 6, 2019 14:17 Inactive
Copy link
Contributor

@minega25 minega25 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@minega25 minega25 left a comment

Choose a reason for hiding this comment

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

LGTM

router.get('/profiles/followers', validateToken, followController.listOfFollowers);
// router.get('/profiles/following', validateToken, followController.listOfFollowedUsers);
// router.get('/profiles/followers', validateToken, followController.listOfFollowers);
router.get('/profiles/:followersOrFollowing', validateToken, followController.listOfFollowersOrFollowed);
Copy link
Contributor

Choose a reason for hiding this comment

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

The previous way was better in the case of routing because the 2 routes are different and therefore should have different methods.

Copy link
Contributor

Choose a reason for hiding this comment

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

In terms of conventions too. e.g look at twitter

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.

None yet

4 participants