Created ability for Admins to review deleted tasks and restore them if needed
This commit is contained in:
@@ -126,6 +126,10 @@ class ApiService {
|
||||
return this.request('/tasks');
|
||||
}
|
||||
|
||||
async getDeletedTasks() {
|
||||
return this.request('/tasks/deleted');
|
||||
}
|
||||
|
||||
async getAudit() {
|
||||
return this.request('/audit');
|
||||
}
|
||||
@@ -148,6 +152,14 @@ class ApiService {
|
||||
return data;
|
||||
}
|
||||
|
||||
async restoreTask(id) {
|
||||
const data = await this.request(`/tasks/${id}/restore`, {
|
||||
method: 'POST',
|
||||
});
|
||||
this.notify();
|
||||
return data;
|
||||
}
|
||||
|
||||
async deleteTask(id) {
|
||||
const data = await this.request(`/tasks/${id}`, {
|
||||
method: 'DELETE',
|
||||
|
||||
Reference in New Issue
Block a user