-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feedback implementation #8
base: master
Are you sure you want to change the base?
Conversation
- Added HsDocs to code - Implemented confirm password
- write more test cases - remove console.logs - return errors correctly - added JsDocs - implement airbnb style guide - Fix eslint errors [Fixes #1]
- write client test for components - write client test for reducers
- write test for all actions - fix bug with jest and images - fix more eslint errors - added favicon to app - changed app port to 6116
- rebundle webpack
- git ignore dist - Add FAQ, limitations and MIT license to readme - Create an email address for postit application - Change all parameters to camelCase - Return responses as object - Change group card layout to take two cards - Add check to not allow users view message of groups they don't belong to - Add page not found to all incorrect routes
- Add posiinstall script
- Add babel-loader to dependencies
- Upgrade node and npm version
- Install babel-oreset-env
- gitignore dist
- change build script
- update dependency
- Fix to remove warnings in console. - Fix Serverside test
- format email notification
8c87991
to
34ac981
Compare
server/test/routes/users.test.js
Outdated
.post('/api/v1/user/signup') | ||
.send({ chopper | ||
}) | ||
.end((err, res) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/users.test.js
Outdated
it('should get token for all tests', (done) => { | ||
api | ||
.post('/api/v1/user/signup') | ||
.send({ chopper |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
server/test/routes/users.test.js
Outdated
describe('ROUTES', () => { | ||
after((done) => { | ||
models.Users.destroy({ where: { username: 'candy' } }).then(() => done()); | ||
}); | ||
|
||
it('should get token for all tests', (done) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/users.test.js
Outdated
@@ -32,10 +33,26 @@ const nullPassword = { | |||
password: null | |||
}; | |||
|
|||
let token = ''; // eslint-disable-line |
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.
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
server/test/routes/users.test.js
Outdated
import app from '../../app'; | ||
import models from '../../server/models'; | ||
import app from '../../../app'; | ||
import models from '../../../server/models'; |
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.
'import' is only available in ES6 (use 'esversion: 6').
server/test/routes/groups.test.js
Outdated
done(); | ||
}); | ||
}); | ||
it('should not create another group with same groupName', (done) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/groups.test.js
Outdated
.set({ jwt: validToken }) | ||
.send(group) | ||
.expect(200) | ||
.end((err, res) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/groups.test.js
Outdated
}); | ||
|
||
describe('POST: (/api/v1/group) - Create', () => { | ||
it('should be an object with keys and values', (done) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/groups.test.js
Outdated
Groups.destroy({ where: { groupName: 'People' } }).then(() => done()); | ||
}); | ||
|
||
describe('POST: (/api/v1/group) - Create', () => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/groups.test.js
Outdated
}); | ||
after((done) => { | ||
UserGroups.destroy({ where: { groupName: 'People' } }); | ||
Groups.destroy({ where: { groupName: 'People' } }).then(() => done()); |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
34ac981
to
89bc76e
Compare
- Add search page for users - Add Add User option - Create Api route to add User to group - Add footer to app - Add heading to login and register form - Add navbar to PageNotFound - Fix heroku issue [Delivers #152948431]
89bc76e
to
5fb5077
Compare
@@ -1,18 +1,19 @@ | |||
/* eslint-disable no-unused-expressions */ | |||
import chai from 'chai'; | |||
import models from '../../server/models'; | |||
import models from '../../models'; |
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.
'import' is only available in ES6 (use 'esversion: 6').
metaData: paginate(count, limit, offset) | ||
}); | ||
}) | ||
.catch(() => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.then(({ rows: users, count }) => { | ||
res.status(200).send({ | ||
message: 'Users found', | ||
users, |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
users, | ||
metaData: paginate(count, limit, offset) | ||
}) | ||
.then(({ rows: users, count }) => { |
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.
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.then((userGroups) => { | ||
res.status(200).send({ userGroups }); | ||
}) | ||
.catch(() => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/controllers/users.js
Outdated
attributes: ['groupName'] | ||
}) | ||
.then((userGroups) => { | ||
res.status(200).send({ userGroups }); |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
server/controllers/users.js
Outdated
}); | ||
attributes: ['groupName'] | ||
}) | ||
.then((userGroups) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Users.findOne({ where: { id: userId } }) | ||
.then((user) => { | ||
if (user.length === 0) { | ||
res.status(404).send({ message: 'No User Found' }); | ||
} else { | ||
res.status(200).send({ userInfo: user.filterUserDetails() }); | ||
} | ||
}).catch(() => { | ||
}) | ||
.catch(() => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
@@ -1,18 +1,19 @@ | |||
/* eslint-disable no-unused-expressions */ | |||
import chai from 'chai'; | |||
import models from '../../server/models'; | |||
import models from '../../models'; |
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.
'import' is only available in ES6 (use 'esversion: 6').
metaData: paginate(count, limit, offset) | ||
}); | ||
}) | ||
.catch(() => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.then(({ rows: users, count }) => { | ||
res.status(200).send({ | ||
message: 'Users found', | ||
users, |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
users, | ||
metaData: paginate(count, limit, offset) | ||
}) | ||
.then(({ rows: users, count }) => { |
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.
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.then((userGroups) => { | ||
res.status(200).send({ userGroups }); | ||
}) | ||
.catch(() => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/controllers/users.js
Outdated
attributes: ['groupName'] | ||
}) | ||
.then((userGroups) => { | ||
res.status(200).send({ userGroups }); |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
server/controllers/users.js
Outdated
}); | ||
attributes: ['groupName'] | ||
}) | ||
.then((userGroups) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Users.findOne({ where: { id: userId } }) | ||
.then((user) => { | ||
if (user.length === 0) { | ||
res.status(404).send({ message: 'No User Found' }); | ||
} else { | ||
res.status(200).send({ userInfo: user.filterUserDetails() }); | ||
} | ||
}).catch(() => { | ||
}) | ||
.catch(() => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
app.get('/api', (req, res) => res.status(200).send({ | ||
message: 'Welcome to the PostIt API!', | ||
})); | ||
app.get('/api', (req, res) => |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/users.test.js
Outdated
phoneNumber: '09087667344', | ||
password: 'medicine' | ||
}; | ||
const signupUser = { |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}, | ||
{ | ||
classMethods: { | ||
associate: (models) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
}); | ||
}; | ||
|
||
export default sendMail; |
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.
'export' is only available in ES6 (use 'esversion: 6').
if (error) { | ||
return error; | ||
} | ||
console.log(`${info.messageId} send: ${info.response}`); |
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.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
const mailOptions = { | ||
from: '"POST_IT" <[email protected]>', | ||
to: email, | ||
subject: `You have a ${priorityHeader} message`, |
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.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
}); | ||
|
||
// setup email data with unicode symbols | ||
const mailOptions = { |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}); | ||
|
||
// create reusable transporter object using the default SMTP transport | ||
const transporter = nodemailer.createTransport({ |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
let email = ''; | ||
|
||
users.forEach((user) => { | ||
email += `${user.User.email},`; |
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.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
// get email of the users | ||
let email = ''; | ||
|
||
users.forEach((user) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
app.get('/api', (req, res) => res.status(200).send({ | ||
message: 'Welcome to the PostIt API!', | ||
})); | ||
app.get('/api', (req, res) => |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
server/test/routes/users.test.js
Outdated
phoneNumber: '09087667344', | ||
password: 'medicine' | ||
}; | ||
const signupUser = { |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}, | ||
{ | ||
classMethods: { | ||
associate: (models) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
}); | ||
}; | ||
|
||
export default sendMail; |
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.
'export' is only available in ES6 (use 'esversion: 6').
if (error) { | ||
return error; | ||
} | ||
console.log(`${info.messageId} send: ${info.response}`); |
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.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
const mailOptions = { | ||
from: '"POST_IT" <[email protected]>', | ||
to: email, | ||
subject: `You have a ${priorityHeader} message`, |
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.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
}); | ||
|
||
// setup email data with unicode symbols | ||
const mailOptions = { |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}); | ||
|
||
// create reusable transporter object using the default SMTP transport | ||
const transporter = nodemailer.createTransport({ |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
let email = ''; | ||
|
||
users.forEach((user) => { | ||
email += `${user.User.email},`; |
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.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
// get email of the users | ||
let email = ''; | ||
|
||
users.forEach((user) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
2e71ff9
to
c176eb1
Compare
Changes Unknown when pulling c176eb1 on feedback-implementation into ** on master**. |
c176eb1
to
a4e5762
Compare
|
||
.icon-pointer { | ||
cursor: pointer; | ||
} |
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.
Files should end with a trailing newline
@@ -175,10 +189,58 @@ nav ul a { | |||
margin-top: 10%; | |||
} | |||
.collection { | |||
margin-bottom: 100px !important; | |||
margin-bottom: 100px !important; |
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.
!important should not be used
margin-right: 30px; | ||
} | ||
margin-top: 50px; | ||
a { |
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.
Rule declaration should be preceded by an empty line
@@ -125,7 +139,7 @@ nav ul a { | |||
} | |||
|
|||
&:hover { | |||
background: rgba(229, 115, 115, 0.08); | |||
background: rgba(229, 115, 115, 0.08); |
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.
Color literals like rgba(229, 115, 115, 0.08)
should only be used in variable declarations; they should be referred to via variable everywhere else.
background: #fff; | ||
width: calc(100% - 300px); | ||
margin-top: 0; | ||
border-top: 1px solid #aaa; |
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.
Color literals like #aaa
should only be used in variable declarations; they should be referred to via variable everywhere else.
right: 0; | ||
bottom: 0; | ||
margin: 0 auto 30px auto; | ||
background: #fff; |
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.
Color literals like #fff
should only be used in variable declarations; they should be referred to via variable everywhere else.
position: fixed; | ||
right: 0; | ||
bottom: 0; | ||
margin: 0 auto 30px auto; |
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.
Shorthands of length 4
are not allowed. Value was 0 auto 30px auto
Shorthand form for property margin
should be written more concisely as 0 auto 30px
instead of 0 auto 30px auto
border-top: 1px solid #aaa; | ||
height: 200px; | ||
.message-holder { | ||
position: fixed; |
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.
Properties should be ordered background, border-top, bottom, height, margin, margin-top, position, right, width
margin: 0 auto; | ||
max-height: calc(100% - 340px); | ||
overflow: scroll; | ||
border: none; |
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.
border: 0
is preferred over border: none
a4e5762
to
904f0aa
Compare
- Users should only see group they belong to
904f0aa
to
035c651
Compare
Changes Unknown when pulling 035c651 on feedback-implementation into ** on master**. |
Changes Unknown when pulling 035c651 on feedback-implementation into ** on master**. |
- include group users page - remove redundant files - remmove wrong import name
.then(group => res.status(200).send({ | ||
group | ||
})) | ||
.catch(error => res.status(404).send(error)); |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.then(group => res.status(200).send(group)) | ||
.catch(error => res.status(400).send(error)); | ||
.then(group => res.status(200).send({ | ||
group |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
*/ | ||
retrieveGroup(req, res) { | ||
Groups.findById(req.params.groupid) | ||
.then(group => res.status(200).send(group)) | ||
.catch(error => res.status(400).send(error)); | ||
.then(group => res.status(200).send({ |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.then(allGroups => res.status(200).send({ | ||
allGroups | ||
})) | ||
.catch(error => res.status(404).send(error)); |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.then(allGroups => res.status(200).send(allGroups)) | ||
.catch(error => res.status(400).send(error)); | ||
.then(allGroups => res.status(200).send({ | ||
allGroups |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}) | ||
.then(allGroups => res.status(200).send(allGroups)) | ||
.catch(error => res.status(400).send(error)); | ||
.then(allGroups => res.status(200).send({ |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
.catch((error) => { | ||
res.status(400).send(`user groups error: ${error.message}`); | ||
res.status(400).send(`${error.message}`); |
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.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
}) | ||
.then(savedGroup => res.status(200).send(savedGroup)) | ||
.then(savedGroup => res.status(200).send({ | ||
savedGroup, |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}) | ||
.then(savedGroup => res.status(200).send(savedGroup)) | ||
.then(savedGroup => res.status(200).send({ |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Changes Unknown when pulling 257686c on feedback-implementation into ** on master**. |
- change models and routes - change test
…/PostIt-Bootcamp-Project into rename-usergroup-model
…e-usergroup-model
} | ||
.link-underline { | ||
text-decoration: underline; | ||
} |
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.
Files should end with a trailing newline
} | ||
.btn-space { | ||
margin-right: 1rem; | ||
} |
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.
Rule declaration should be followed by an empty line
|
||
.urgent { | ||
background: red; | ||
} |
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.
Rule declaration should be followed by an empty line
} | ||
|
||
.urgent { | ||
background: red; |
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.
Color red
should be written in hexadecimal form as #ff0000
Color literals like red
should only be used in variable declarations; they should be referred to via variable everywhere else.
|
||
.priority-badge { | ||
background: red; | ||
color: white; |
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.
Properties should be ordered background, border-radius, color, padding
Color white
should be written in hexadecimal form as #ffffff
Color literals like white
should only be used in variable declarations; they should be referred to via variable everywhere else.
Rename usergroup model
f7935b2
to
b6c88ec
Compare
it('should be valid if compared', () => { | ||
expect(person.verifyPassword(userInfo.password)).to.be.true; | ||
it('should be valid if compared', (done) => { | ||
expect(person.verifyPassword(userDetails.password)).to.be.true; |
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.
Expected an assignment or function call and instead saw an expression.
Changes Unknown when pulling b6c88ec on feedback-implementation into ** on master**. |
user.update({ | ||
Users.findOne({ | ||
where: { email } | ||
}).then((user) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
} else { | ||
user.update({ | ||
Users.findOne({ | ||
where: { email } |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
attributes: ['groupId', 'groupName'] | ||
}) | ||
.then((userGroups) => { | ||
res.status(200).send({ userGroups }); |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}); | ||
attributes: ['groupId', 'groupName'] | ||
}) | ||
.then((userGroups) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
*/ | ||
viewUser(req, res) { | ||
const userId = req.body.userId; | ||
const userId = req.decoded.userId; |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
phoneNumber: foundUser.phoneNumber | ||
}; | ||
return res.status(200).send({ | ||
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
secret, | ||
{ expiresIn: '1 day' } | ||
); | ||
const userDetails = { |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
*/ | ||
signin(req, res) { | ||
if (req.body.username && req.body.password) { | ||
Users.findOne({ where: { username: req.body.username } }) | ||
.then((foundUser) => { | ||
if (foundUser && foundUser.verifyPassword(req.body.password)) { | ||
const token = jwt.sign({ | ||
const token = jwt.sign( |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
return res.status(200).send({ token, userInfo }); | ||
return res.status(200).send({ | ||
token, | ||
userInfo, |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
email: newUser.email | ||
}; | ||
return res.status(200).send({ token, userInfo }); | ||
return res.status(200).send({ | ||
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
user.update({ | ||
Users.findOne({ | ||
where: { email } | ||
}).then((user) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
} else { | ||
user.update({ | ||
Users.findOne({ | ||
where: { email } |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
attributes: ['groupId', 'groupName'] | ||
}) | ||
.then((userGroups) => { | ||
res.status(200).send({ userGroups }); |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}); | ||
attributes: ['groupId', 'groupName'] | ||
}) | ||
.then((userGroups) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
*/ | ||
viewUser(req, res) { | ||
const userId = req.body.userId; | ||
const userId = req.decoded.userId; |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
phoneNumber: foundUser.phoneNumber | ||
}; | ||
return res.status(200).send({ | ||
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
secret, | ||
{ expiresIn: '1 day' } | ||
); | ||
const userDetails = { |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
*/ | ||
signin(req, res) { | ||
if (req.body.username && req.body.password) { | ||
Users.findOne({ where: { username: req.body.username } }) | ||
.then((foundUser) => { | ||
if (foundUser && foundUser.verifyPassword(req.body.password)) { | ||
const token = jwt.sign({ | ||
const token = jwt.sign( |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
return res.status(200).send({ token, userInfo }); | ||
return res.status(200).send({ | ||
token, | ||
userInfo, |
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
email: newUser.email | ||
}; | ||
return res.status(200).send({ token, userInfo }); | ||
return res.status(200).send({ | ||
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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
What does this PR do?