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

#167271972 changes on comment #66

Merged
merged 3 commits into from
Jul 17, 2019
Merged

Conversation

Kabalisa
Copy link
Collaborator

Description

I need to refactor the responses I get while deleting and updating comments. I also have to remove the requirement of authorization when a user needs to read comments on an article.
Type of change

  • remove the requirement of authorization when a user needs to read comments on an article
  • add remaining comments in the response given after deleting one comment
  • add updated comments in the response given after updating one comment
  • order fetched comments by the descending order of their createdAt field.

How has it been tested

  • run npm test

Checklist:

N/A

Pivotal tracker story ID

#166161652

Denis Niwemugisha and others added 2 commits July 13, 2019 15:51
currentUser.dataValues.following = !!userFollowing;
return currentUser;
})
);

Choose a reason for hiding this comment

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

Unexpected newline before ')' function-paren-newline

currentUser.dataValues.following = !!userFollowing;
return currentUser;
}));
await Promise.all(

Choose a reason for hiding this comment

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

Unexpected newline after '(' function-paren-newline

currentComment.dataValues.histories = commentHistories;
return currentComment;
})
);

Choose a reason for hiding this comment

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

Unexpected newline before ')' function-paren-newline

currentComment.dataValues.histories = commentHistories;
return currentComment;
}));
await Promise.all(

Choose a reason for hiding this comment

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

Unexpected newline after '(' function-paren-newline

`${process.env.FRONTEND_URL}/articles?token=${token}&username=${
req.user.username
}`
);

Choose a reason for hiding this comment

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

Unexpected newline before ')' function-paren-newline

@@ -44,7 +51,11 @@ class UserController {
return res.status(500).send('Internal error');
}
const token = helper.generateToken(newUser.dataValues);
return res.redirect(`${process.env.FRONTEND_URL}/articles?token=${token}&username=${req.user.username}`);
return res.redirect(

Choose a reason for hiding this comment

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

Unexpected newline after '(' function-paren-newline

`${process.env.FRONTEND_URL}/articles?token=${token}&username=${
req.user.username
}`
);

Choose a reason for hiding this comment

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

Unexpected newline before ')' function-paren-newline

if (isValidPassword) {
const token = helper.generateToken(userExist.dataValues);
return res.redirect(`${process.env.FRONTEND_URL}/articles?token=${token}&username=${req.user.username}`);
return res.redirect(

Choose a reason for hiding this comment

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

Unexpected newline after '(' function-paren-newline

const numberOfSharesOnPlatform = await ArticleHelper.numberOfSharesOnPlatform(shares);
const numberOfSharesOnPlatform = await ArticleHelper.numberOfSharesOnPlatform(
shares
);

Choose a reason for hiding this comment

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

Unexpected newline before ')' function-paren-newline

}
const numberOfSharesOnPlatform = await ArticleHelper.numberOfSharesOnPlatform(shares);
const numberOfSharesOnPlatform = await ArticleHelper.numberOfSharesOnPlatform(

Choose a reason for hiding this comment

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

Unexpected newline after '(' function-paren-newline

@Kabalisa Kabalisa force-pushed the ch-changes-on-comment-#167271972 branch from 3fed000 to 5c7ec44 Compare July 16, 2019 13:26
-remove authorization on read comment
-add orderby createdAt on fecth comments
-fetch remaining comments after deleting a coment
-fetch updated comments after updating a comment
[finishes #167271972]
@Kabalisa Kabalisa force-pushed the ch-changes-on-comment-#167271972 branch from 5c7ec44 to e9df2e9 Compare July 16, 2019 13:31
@macphilips macphilips merged commit bead5b4 into develop Jul 17, 2019
@macphilips macphilips deleted the ch-changes-on-comment-#167271972 branch July 17, 2019 12:11
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

3 participants