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

#162727487 comment update history #30

Merged
merged 6 commits into from
Jan 27, 2019

Conversation

julietezekwe
Copy link
Contributor

What does this PR do?

This PR implements comment edit history track

Description of Task to be completed?

Comment edit history can be saved and be retrieved

How should this be manually tested?

On the update comment route PUT /api/v1/arts/comments/commentId
Update a comment with a certain more as many times as you want
Hit GET /api/v1/arts/coments/commentId with same ID and get all the edit history

Any background context you want to provide?

Run npm run db:seed before testing

What are the relevant pivotal tracker stories?

#162727487

Screenshots (if appropriate)

None

Questions:

None

…into feature/162727487/comment-update-history

Merge staging to current branch
.
Write test for edit history
implement get all edit histroy
implement create edit history
write validation for comment update body
[Feature #162727487]
@@ -0,0 +1,23 @@
module.exports = {

Choose a reason for hiding this comment

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

'module' is not defined no-undef

src/db/seeders/d_commentSeeder.js Show resolved Hide resolved
const { body } = req.body;
const { commentId } = req.params;
const { id } = req.verifyUser;
const findComment = await Comment.find({

Choose a reason for hiding this comment

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

Can we move this to the middleware. I think it will make more sense there.

Choose a reason for hiding this comment

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

You didn't fix this....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh just seeing this. will do now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,58 @@
import models from '../db/models';

Choose a reason for hiding this comment

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

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@andela-dbamidele andela-dbamidele merged commit f0ffb70 into staging Jan 27, 2019
@andela-dbamidele andela-dbamidele deleted the feature/162727487/comment-update-history branch January 27, 2019 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants