fix(clickup/create-list): send priority and due date only when provided
This commit is contained in:
@@ -116,10 +116,16 @@ export default defineAction({
|
|||||||
const body = {
|
const body = {
|
||||||
name: listName,
|
name: listName,
|
||||||
content: listInfo,
|
content: listInfo,
|
||||||
due_date: dueDate,
|
|
||||||
priority,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (priority) {
|
||||||
|
body.priority = priority;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dueDate) {
|
||||||
|
body.due_date = dueDate;
|
||||||
|
}
|
||||||
|
|
||||||
const { data } = await $.http.post(`/v2/folder/${folderId}/list`, body);
|
const { data } = await $.http.post(`/v2/folder/${folderId}/list`, body);
|
||||||
|
|
||||||
$.setActionItem({
|
$.setActionItem({
|
||||||
|
Reference in New Issue
Block a user