chore(image-upload):configure cloudinary - #1
Conversation
| devtool: setDevTool() | ||
| }, | ||
| node: { | ||
| fs: "empty" |
There was a problem hiding this comment.
Strings must use singlequote quotes
| }, | ||
| plugins: [ | ||
| new HtmlWebpackPlugin({ | ||
| template: __dirname + "/client/public/index.html", |
There was a problem hiding this comment.
Use path.join() or path.resolve() instead of + to create paths no-path-concat
Strings must use singlequote quotes
| __dirname + "/client/src/index.jsx", | ||
| ], | ||
| output: { | ||
| path: __dirname + "/client/dist", |
There was a problem hiding this comment.
Use path.join() or path.resolve() instead of + to create paths no-path-concat
Strings must use singlequote quotes
| test: /\.html$/, | ||
| use: ['html-loader'] | ||
| entry: [ | ||
| __dirname + "/client/src/index.jsx", |
There was a problem hiding this comment.
Use path.join() or path.resolve() instead of + to create paths no-path-concat
Strings must use singlequote quotes
| if (isDevelopment) { | ||
| publicPath = `http://localhost:${PORT}/` | ||
| } else if (isProduction) { | ||
| publicPath = `${ROOT_URL}` |
| publicPath = `${ROOT_URL}` | ||
| } | ||
| return publicPath; | ||
| let publicPath |
| } else if (isProduction) { | ||
| return 'source-map' | ||
| } else { | ||
| return 'inline-source-map' |
| return 'eval' | ||
| } else if (isProduction) { | ||
| return 'source-map' | ||
| } else { |
There was a problem hiding this comment.
Unnecessary 'else' after 'return' no-else-return
| if (isDevelopment) { | ||
| return 'eval' | ||
| } else if (isProduction) { | ||
| return 'source-map' |
| return 'inline-source-map' | ||
| } | ||
| if (isDevelopment) { | ||
| return 'eval' |
| done(); | ||
| }); | ||
| }).timeout(5000); | ||
| it('it should not post user credentials to database where email exist on the database', (done) => { |
There was a problem hiding this comment.
Line 111 exceeds the maximum line length of 100 max-len
| }); | ||
| }).timeout(5000); | ||
| // Each username should be unique | ||
| it('it should not post user credentials to database where username exist on the database', (done) => { |
There was a problem hiding this comment.
Line 87 exceeds the maximum line length of 100 max-len
| } | ||
| }); | ||
| }, | ||
| down: function(queryInterface, Sequelize) { |
There was a problem hiding this comment.
'Sequelize' is defined but never used no-unused-vars
| password, | ||
| confirmPassword | ||
| } = req.body; | ||
| if (username === (null || '') || email === (null || '') || password === (null || '') || confirmPassword === (null || '')) { |
There was a problem hiding this comment.
Line 28 exceeds the maximum line length of 100 max-len
| return res.status(401).send({ message: 'Your session has expired. Please try logging in again' }); | ||
| let decoded = jwt.decode(token, secret, { algorithm: 'HS256' }); | ||
| if (decoded === null) { | ||
| return res.status(401).send({ message: 'Your session has expired. Please try logging in again' }); |
There was a problem hiding this comment.
Line 88 exceeds the maximum line length of 100 max-len
| if (isDevelopment) { | ||
| publicPath = `http://localhost:${PORT}/` | ||
| } else if (isProduction) { | ||
| publicPath = `${ROOT_URL}` |
| const setPublicPath = () => { | ||
| let publicPath | ||
| if (isDevelopment) { | ||
| publicPath = `http://localhost:${PORT}/` |
| } | ||
| } | ||
| const setPublicPath = () => { | ||
| let publicPath |
| } else { | ||
| return 'inline-source-map' | ||
| } | ||
| } |
| } else if (isProduction) { | ||
| return 'source-map' | ||
| } else { | ||
| return 'inline-source-map' |
| return 'eval' | ||
| } else if (isProduction) { | ||
| return 'source-map' | ||
| } else { |
There was a problem hiding this comment.
Unnecessary 'else' after 'return' no-else-return
| if (isDevelopment) { | ||
| return 'eval' | ||
| } else if (isProduction) { | ||
| return 'source-map' |
|
|
||
| const setDevTool = () => { | ||
| if (isDevelopment) { | ||
| return 'eval' |
| CLOUDINARY_API_KEY, | ||
| CLOUDINARY_API_SECRET, | ||
| CLOUD_NAME, | ||
| } = process.env |
Modify content handling by using cloudinary API