Skip to content

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
Member

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
Member

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