Skip to content

Conversation

@chikoom
Copy link
Owner

@chikoom chikoom commented Jul 25, 2020

No description provided.

Copy link

@liorho liorho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH OH

return $.get('/categories')
}
addExpence(data){
return $.post('/new', data)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of "new", you should call it "expense".... just the fact that it is a post request makes it "new"...

return $.post('/new', data)
}
validator(data){
for (const [key, value] of Object.entries(data)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point of using the Object.entries method if you don't really use the key.... you could just do -

for (const key in data) { if(data[key].length<1) throw {status: 999} }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants