fix(api-task): satisfy strict typings in task service

This commit is contained in:
2026-04-06 00:53:07 +08:00
parent 0c496c6ba6
commit de1db459c2
+3 -3
View File
@@ -75,7 +75,7 @@ export class TaskService {
]);
return {
items: items.map((item) => this.serializeTask(item)),
items: items.map((item: TaskEntity) => this.serializeTask(item)),
page,
pageSize,
total
@@ -363,7 +363,7 @@ export class TaskService {
);
await tx.taskTag.createMany({
data: tags.map((tag) => ({
data: tags.map((tag: { id: string }) => ({
taskId,
tagId: tag.id
})),
@@ -382,7 +382,7 @@ export class TaskService {
ddl: task.ddl?.toISOString() ?? null,
completedAt: task.completedAt?.toISOString() ?? null,
version: task.version,
tags: task.taskTags.map((taskTag) => taskTag.tag.name),
tags: task.taskTags.map((taskTag: { tag: { name: string } }) => taskTag.tag.name),
createdAt: task.createdAt.toISOString(),
updatedAt: task.updatedAt.toISOString()
};