todo_service: POST /todos возвращает todo (по API)
All checks were successful
ci / test (push) Successful in 26s
ci / deploy (push) Successful in 2m11s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 11:14:18 +03:00
parent ad17e8364f
commit e6ac717623

View File

@@ -473,12 +473,13 @@ export class TodoCore {
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 assignees = await this.membershipIds(i);
return this.runWrite(
const r = await this.runWrite(
"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 },
caller,
key,
);
return r.status === "done" ? { ...r, todo: await this.get(caller, (r as { id: string }).id) } : r;
}
/** Пара Control: todo исполнителю (срок по умолчанию 3 рабочих дня) и Control todo контролёру (срок + 2 дня, название с "Control:"). */