Skip to content

Commit b5511fe

Browse files
committed
restore(api): move task endpoint
1 parent 1df45af commit b5511fe

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • recoco/frontend/src/js/utils

recoco/frontend/src/js/utils/api.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,17 @@ export function taskUrl(projectId, taskId) {
167167
export function tasksUrl(projectId) {
168168
return `/api/projects/${projectId}/tasks/`;
169169
}
170+
/**
171+
* Params:
172+
* - projectId
173+
* - taskId
174+
* Payload:
175+
* - "above"/"below" with the id of the task to move above/below
176+
* - "top"/"bottom" set to true to move the task to the top/bottom of the list
177+
*/
178+
export function moveTaskUrl(projectId, taskId) {
179+
return `/api/projects/${projectId}/tasks/${taskId}/move/`;
180+
}
170181

171182
export function taskNotificationsUrl(projectId, taskId) {
172183
return `/api/projects/${projectId}/tasks/${taskId}/notifications/`;

0 commit comments

Comments
 (0)