fix(clickup/create-list): send priority and due date only when provided

This commit is contained in:
Ali BARIN
2024-08-15 12:06:40 +00:00
parent a3a4a8e431
commit 7f2937400a

View File

@@ -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({