-
Notifications
You must be signed in to change notification settings - Fork 2
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
clean code #1
base: master
Are you sure you want to change the base?
clean code #1
Conversation
try { | ||
return await this.req.get(eventListUrl, { | ||
return this.req.get(eventListUrl, { |
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.
the catch inside this function will be useless then?
I'm putting out catch in this function to avoid polluting the caller with handling got http error
const { | ||
uploadFile | ||
} = require('./libraries/bucketManager'); | ||
const { uploadFile } = require('./libraries/bucketManager'); |
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.
which clean code standart are we using? why are you modifiying some into one line but leaving out the others?
@@ -40,7 +38,11 @@ app.post('/', async (req, res, next) => { | |||
} = req.body; | |||
|
|||
await login.login(email, password); | |||
const pages = await Promise.all([login.getTicketList(), login.getEventlist(), login.getHandshakeList()]); | |||
const pages = await Promise.all([ |
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.
agree with this, should've spanned multiple lines
} | ||
|
||
if (handshakes.length === 0) { | ||
} else { |
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.
else will prone to error if we have unhandled case within the ifs, in this case, we know every possible case, so it's okay.
No description provided.