Acknowledge too, make acknowledge tasks an action

This commit is contained in:
shamoon
2024-11-08 00:01:44 -08:00
parent 308f8b3089
commit 245a9f5006
5 changed files with 59 additions and 20 deletions

View File

@@ -48,7 +48,7 @@ describe('TasksService', () => {
it('calls acknowledge_tasks api endpoint on dismiss and reloads', () => {
tasksService.dismissTasks(new Set([1, 2, 3]))
const req = httpTestingController.expectOne(
`${environment.apiBaseUrl}acknowledge_tasks/`
`${environment.apiBaseUrl}tasks/acknowledge/`
)
expect(req.request.method).toEqual('POST')
expect(req.request.body).toEqual({

View File

@@ -64,7 +64,7 @@ export class TasksService {
public dismissTasks(task_ids: Set<number>) {
this.http
.post(`${this.baseUrl}acknowledge_tasks/`, {
.post(`${this.baseUrl}tasks/acknowledge/`, {
tasks: [...task_ids],
})
.pipe(first())