Skip to content

Conversation

@therealcljohn
Copy link
Contributor

This is a followup to the previous discussions at #26, GH-64 and #155. This adds a findOne method as an alternative to the findRecord-method. The new method returns a JsonApiQueryResponse instead of a JsonApiModel to be able to access metadata when fetching a single record.

I tried to make the changes backwards compatible. Please check if this fits into the framework and if it does please merge :)

Clemens John added 4 commits February 18, 2018 10:55
…ch naming in jsonapi specification.

Signed-off-by: Clemens John <clemens.john@openitb.com>
…del() for retrieving it.

Signed-off-by: Clemens John <clemens.john@openitb.com>
… and match naming in jsonapi specification."

This reverts commit 2dbc30c.
…ase.

Signed-off-by: Clemens John <clemens.john@openitb.com>
@coveralls
Copy link

coveralls commented Feb 18, 2018

Coverage Status

Coverage decreased (-0.2%) to 87.973% when pulling e971906 on floh1111:metadata-enhancements into 68fb942 on ghidoz:master.

.catch((res: any) => this.handleError(res));
}

findOne<T extends JsonApiModel>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This method is just the same as findRecord, except of one line. Could you make a private "internal" method instead which combines findOne and findRecord ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean something like in e971906?

Clemens John added 2 commits March 3, 2018 15:00
Signed-off-by: Clemens John <clemens.john@openitb.com>
Signed-off-by: Clemens John <clemens.john@openitb.com>
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