-
Notifications
You must be signed in to change notification settings - Fork 1
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
#159987407 User can post comments #12
Conversation
test/test.articles.js
Outdated
password: 'pasS1234', | ||
}) | ||
.end((err, res) => { | ||
token = res.body.data.token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use object destructuring prefer-destructuring
test/test.articles.js
Outdated
@@ -0,0 +1,88 @@ | |||
import chai from 'chai'; | |||
import chaiHttp from 'chai-http'; | |||
import app from '../server/app'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "../server/app" import/extensions
test/test.articles.js
Outdated
@@ -0,0 +1,88 @@ | |||
import chai from 'chai'; | |||
import chaiHttp from 'chai-http'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "chai-http" import/extensions
test/test.articles.js
Outdated
@@ -0,0 +1,88 @@ | |||
import chai from 'chai'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "chai" import/extensions
server/utils/generateToken.js
Outdated
@@ -0,0 +1,14 @@ | |||
import jwt from 'jsonwebtoken'; | |||
import dotenv from 'dotenv'; | |||
import Cryptr from 'cryptr'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "cryptr" import/extensions
server/routes/articlesRoutes.js
Outdated
@@ -0,0 +1,13 @@ | |||
import express from 'express'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "express" import/extensions
server/models/users.js
Outdated
@@ -1,3 +1,5 @@ | |||
import bcrypt from 'bcrypt'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "bcrypt" import/extensions
server/middleware/auth.js
Outdated
@@ -0,0 +1,42 @@ | |||
import jwt from 'jsonwebtoken'; | |||
import { config } from 'dotenv'; | |||
import Cryptr from 'cryptr'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "cryptr" import/extensions
server/middleware/auth.js
Outdated
@@ -0,0 +1,42 @@ | |||
import jwt from 'jsonwebtoken'; | |||
import { config } from 'dotenv'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "dotenv" import/extensions
server/middleware/auth.js
Outdated
@@ -0,0 +1,42 @@ | |||
import jwt from 'jsonwebtoken'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "jsonwebtoken" import/extensions
Pull Request Test Coverage Report for Build 368
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, but git workflow could have been better. Try and level up in this area
.then(comment => Users.findById(userId, { | ||
attributes: ['id', 'username', 'firstname', 'lastname', 'createdAt', 'updatedAt'] | ||
}) | ||
.then(user => res.status(201).jsend.success({ user, comment }))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No catch block. We always need to handle cases like this. Just in case
3123696
to
69cba1f
Compare
@@ -1,4 +1,11 @@ | |||
import helper from '../helpers/helpers'; | |||
import helpers from '../helpers/helpers'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "../helpers/helpers" import/extensions
@@ -0,0 +1,22 @@ | |||
import helpers from '../helpers/helpers'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "../helpers/helpers" import/extensions
@@ -0,0 +1,31 @@ | |||
import validator from 'validator'; | |||
import models from '../models/index'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "../models/index" import/extensions
@@ -0,0 +1,31 @@ | |||
import validator from 'validator'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "validator" import/extensions
server/app.js
Outdated
@@ -5,6 +5,7 @@ import swaggerUi from 'swagger-ui-express'; | |||
import jsend from 'jsend'; | |||
import swaggerDocument from '../swagger.json'; | |||
import userRoutes from './routes/userRoutes'; | |||
import articlesRoutes from './routes/articlesRoutes'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing file extension for "./routes/articlesRoutes" import/extensions
69cba1f
to
a5b2603
Compare
test/test.articles.js
Outdated
password: 'pasS1234', | ||
}) | ||
.end((err, res) => { | ||
token = res.body.data.token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use object destructuring prefer-destructuring
01c1fdf
to
3c94038
Compare
aa4ab28
to
8733381
Compare
test/comments.spec.js
Outdated
password: 'pasS1234', | ||
}) | ||
.end((err, res) => { | ||
token = res.body.data.token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use object destructuring prefer-destructuring
test/comments.spec.js
Outdated
password: 'pasS1234', | ||
}) | ||
.end((err, res) => { | ||
token = res.body.data.token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use object destructuring prefer-destructuring
- add article routes - add seed to initialise a user, category and article - create controller to handle comment posts - create middleware validate user comments - update documentation to capture new route - write tests to test endpoint functionality - refactor usersValidations to confirm with ES6 syntax and not to send descriptive errors when logging in [Delivers ##159987407] feat(comment): user can comment - add article routes - add seed to initialise a user, category and article - create controller to handle comment posts - create middleware validate user comments - update documentation to capture new route - write tests to test endpoint functionality [Delivers ##159987407] feat(comment): user can comment - add article routes - add seed to initialise a user, category and article - create controller to handle comment posts - create middleware validate user comments - update documentation to capture new route - write tests to test endpoint functionality - refactor usersValidations to confirm with ES6 syntax and not to send descriptive errors when logging in [Delivers ##159987407] update tests
8733381
to
37e6f39
Compare
password: 'Password' | ||
}) | ||
.end((err, res) => { | ||
token = res.body.data.token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use object destructuring prefer-destructuring
What does this PR do?
Description of Task to be completed?
/api/v1/articles/:articleId
How should this be manually tested?
What are the relevant pivotal tracker stories?
#159987407