-
Notifications
You must be signed in to change notification settings - Fork 5
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
#152539728 UI redesign of main page #27
#152539728 UI redesign of main page #27
Conversation
- Group components in folders
- Token decoded at the server side - Welcome message for unauthenticated users implemented - User Book Routes refactored to reflect change in routes
- Borrowed books displayed - fetchbook by User id implemented
- Implemented pagination - Implemented Display for Userbooks
|
||
}; | ||
} |
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 semicolon semi
getJWT, | ||
authenticate, | ||
authenticate, | ||
decodeToken |
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 indentation of 2 spaces but found 0 indent
getJWT, | ||
authenticate, | ||
authenticate, |
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 indentation of 2 spaces but found 0 indent
}); | ||
|
||
|
||
module.exports = { | ||
module.exports ={ |
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.
Infix operators must be spaced space-infix-ops
} else if (token) { | ||
resolve({status: 'Success', token}); | ||
} else { | ||
reject(new Error({status: 'Error', message: 'Error generating 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.
A space is required after '{' object-curly-spacing
A space is required before '}' object-curly-spacing
const token = req.headers['x-access-token'] || req.headers.authorization; | ||
if (token) { | ||
jwt.verify(token, process.env.JWT_SECRET, (error, decoded) => { | ||
if (error) { | ||
return res | ||
.status(401) | ||
.json({ message: 'Unauthorised access' }); | ||
.json({token:null, message: 'Unauthorised access'}); |
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.
A space is required after '{' object-curly-spacing
Missing space before value for key 'token' key-spacing
A space is required before '}' object-curly-spacing
@@ -10,61 +10,63 @@ import jwt from 'jsonwebtoken'; | |||
* @return {undefined} if not defined send a response to the server indicating this | |||
*/ | |||
const authenticate = (req, res, next) => { | |||
if (req.url.startsWith('/auth')) return next(); | |||
if (req.url.startsWith('/auth')) |
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 { after 'if' condition curly
@@ -1,5 +1,5 @@ | |||
import jwt from 'jsonwebtoken'; | |||
|
|||
import jwtDecode from 'jwt-decode'; |
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.
Unable to resolve path to module 'jwt-decode' import/no-unresolved
Missing file extension for "jwt-decode" import/extensions
@@ -22,6 +22,7 @@ import { | |||
*/ | |||
export default function bookReducer (state = { | |||
books: [], | |||
borrowedbooks:[], |
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 space before value for key 'borrowedbooks' key-spacing
} | ||
return JSON.parse(serializedState); | ||
} catch (error) { | ||
return; |
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.
Unnecessary return statement no-useless-return
What does this PR do?
Description of Task to be completed?
How should this be manually tested?
Screenshots (if appropriate):
![screen shot 2017-11-13 at 10 24 41 pm](https://user-images.githubusercontent.com/26222856/32750020-970f9ca8-c8c1-11e7-8b48-80ad4844bbda.png)
#### Any background context you want to provide? - Materialize ccss, - React tabsWhat are the relevant pivotal tracker stories?
152686714
Types of changes
Checklist: