Skip to content
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

Add 'fetch' based methods for first() and find()... #61

Merged
merged 3 commits into from
Apr 18, 2019

Conversation

leeovery
Copy link
Contributor

Add 'fetch' based for first() and find() to enable single object responses with 'data' wrapper attribute present.

@codecov
Copy link

codecov bot commented Apr 10, 2019

Codecov Report

Merging #61 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #61   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines         252    262   +10     
  Branches       45     48    +3     
=====================================
+ Hits          252    262   +10
Impacted Files Coverage Δ
src/StaticModel.js 100% <100%> (ø) ⬆️
src/Model.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e5ec0d...1cde377. Read the comment docs.

@robsontenorio
Copy link
Owner

Nice job! I will review it. Can you help me with #56?

@leeovery
Copy link
Contributor Author

@robsontenorio Sure Ill try take a look tonight if I can :)

@DanWithams7d
Copy link

Implementation looks good to me, will be using @leeovery 's branch until @robsontenorio accepts this PR.

@robsontenorio robsontenorio merged commit 1d35753 into robsontenorio:master Apr 18, 2019
@rossity
Copy link
Contributor

rossity commented Apr 29, 2019

@leeovery @robsontenorio I believe this makes calls such as save() fail, as save() only works when calling find(), not $find()

Otherwise you get save() is not a function

A solution would be to allow the function to work and also remove the data wrapping on save

@rossity
Copy link
Contributor

rossity commented Apr 29, 2019

Edit, I submitted a PR to fix this issue here #67

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.

4 participants