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

feat: remaining entity service methods #255

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

colesanders
Copy link
Contributor

* Fixed issue with operation not being passed to url prefix resolver
+ Added createMany
+ Added updateMany
+ Added replaceMany
+ Added deleteMany
+ Added deleteManyByKeys

@colesanders colesanders self-assigned this Aug 26, 2024
@colesanders colesanders requested a review from schuchard August 26, 2024 18:19
// This seems like a somewhat odd REST API pattern.
return this.buildUrl('deleteManyByKeys', entityInfo, criteria).pipe(
switchMap(url => this.http.delete<any>(url, { body: { keys } })),
map(() => keys) // Will auto entity handle this correctly and remove the entities from state?
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this isn't fully understood, does it need to be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of these methods are were asked for by the Timebug team to allow the use of bulk endpoints and reduce the api calls. I figured for now this would work just fine since the generic service would also allow for different bulk delete by key approaches, such as with query params. Also, I did some digging into the deleteManyByKeys and it looks like it should work fine, so I can remove the second comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. If you can update or remove the comments we can merge this.

  * Fixed issue with operation not being passed to url prefix resolver
  + Added createMany
  + Added updateMany
  + Added replaceMany
  + Added deleteMany
  + Added deleteManyByKeys
@colesanders colesanders force-pushed the feat/remaining-entity-service-methods branch from f835b59 to 2d6d1c6 Compare August 27, 2024 18:09
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