Skip to content

Commit

Permalink
fix(events): XXX-0 fix bulk event update URL
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Bulk update URL for events changed from /bulk/hours to /bulk/events
  • Loading branch information
noticeeverything committed Mar 3, 2022
1 parent 3e8b2bd commit a7392fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/events/events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Events', () => {
const res = { data: { updated_ids: [1] } }
jest.spyOn(axiosMock, 'post').mockResolvedValue(res)
await expect(events.bulkUpdate(update)).resolves.toEqual(res.data)
expect(axiosMock.post).toHaveBeenCalledWith('/accountId/bulk/hours', {
expect(axiosMock.post).toHaveBeenCalledWith('/accountId/bulk/events', {
update: [{ billed: true, id: 1 }],
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/lib/events/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Events {
async bulkUpdate(
updateArray: TimelyEventBulkUpdate[],
): Promise<TimelyBulkUpdateEventsReturn[]> {
const { data } = await this.http.post(`/${this.config.accountId}/bulk/hours`, {
const { data } = await this.http.post(`/${this.config.accountId}/bulk/events`, {
update: updateArray,
})
return data
Expand Down

0 comments on commit a7392fd

Please sign in to comment.