Skip to content

Conversation

@adamwardecki
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Mar 9, 2018

Codecov Report

Merging #186 into master will decrease coverage by 4.48%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #186      +/-   ##
=========================================
- Coverage   35.09%   30.6%   -4.49%     
=========================================
  Files         106     114       +8     
  Lines        3243    4283    +1040     
=========================================
+ Hits         1138    1311     +173     
- Misses       2105    2972     +867

@adamwardecki adamwardecki requested a review from mkucharz March 9, 2018 10:02
@mkucharz
Copy link
Member

mkucharz commented Mar 9, 2018

Labels for PR please.

data.authors.create({ name, books: ids })
.then(res => {
response.json(res)
}).catch(({ data, status }) => {
Copy link
Member

Choose a reason for hiding this comment

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

catch should be in a new line

}).catch(({ data, status }) => {
response.json(data, status)
})
}).catch(({ data, status }) => {
Copy link
Member

Choose a reason for hiding this comment

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

same as above

data.authors.with('books')
.list()
.then(objects => {
response.json(objects)
Copy link
Member

Choose a reason for hiding this comment

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

add here return respo... this a better practice

.then(res => {
response.json(res)
}).catch(({ data, status }) => {
response.json(data, status)
Copy link
Member

Choose a reason for hiding this comment

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

add here return respo... this a better practice (and everywhere bellow)

@adamwardecki
Copy link
Contributor Author

@mkucharz done

@mkucharz mkucharz added the DOCS label Mar 16, 2018
@mkucharz mkucharz merged commit 0bde1d6 into master Mar 16, 2018
@mkucharz mkucharz deleted the cookbook/data-objects branch March 16, 2018 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants