todo_service: POST /todos возвращает todo (по API)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -473,12 +473,13 @@ export class TodoCore {
|
|||||||
const name = kind === "control" ? ensureControlPrefix(i.name) : i.name.trim();
|
const name = kind === "control" ? ensureControlPrefix(i.name) : i.name.trim();
|
||||||
const due = i.due ?? defaultDue(this.today(), this.d.settings.defaults.dueWorkdays, await this.nonWorkdays());
|
const due = i.due ?? defaultDue(this.today(), this.d.settings.defaults.dueWorkdays, await this.nonWorkdays());
|
||||||
const assignees = await this.membershipIds(i);
|
const assignees = await this.membershipIds(i);
|
||||||
return this.runWrite(
|
const r = await this.runWrite(
|
||||||
"create",
|
"create",
|
||||||
{ jobId: i.jobId, name, description: i.description, due, assignees, kind, reviewDate: i.reviewDate, createdByKind: i.createdByKind ?? (caller.kind === "person" ? "agent" : "automation"), createdBy: i.createdBy ?? caller.name },
|
{ jobId: i.jobId, name, description: i.description, due, assignees, kind, reviewDate: i.reviewDate, createdByKind: i.createdByKind ?? (caller.kind === "person" ? "agent" : "automation"), createdBy: i.createdBy ?? caller.name },
|
||||||
caller,
|
caller,
|
||||||
key,
|
key,
|
||||||
);
|
);
|
||||||
|
return r.status === "done" ? { ...r, todo: await this.get(caller, (r as { id: string }).id) } : r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Пара Control: todo исполнителю (срок по умолчанию 3 рабочих дня) и Control todo контролёру (срок + 2 дня, название с "Control:"). */
|
/** Пара Control: todo исполнителю (срок по умолчанию 3 рабочих дня) и Control todo контролёру (срок + 2 дня, название с "Control:"). */
|
||||||
|
|||||||
Reference in New Issue
Block a user