feat: list + task endpoints and CORS, verified end-to-end

This commit is contained in:
2026-06-10 07:58:51 +00:00
parent 394bceca5f
commit 285bac4308
11 changed files with 143 additions and 0 deletions

23
server/utils/dto.ts Normal file
View File

@@ -0,0 +1,23 @@
import type { TaskRow } from "./repo";
export interface TaskDto {
id: string;
listId: string;
title: string;
description: string | null;
source: string;
consumed: boolean;
createdAt: string;
}
export function toTaskDto(row: TaskRow): TaskDto {
return {
id: row.id,
listId: row.list_id,
title: row.title,
description: row.description,
source: row.source,
consumed: row.consumed,
createdAt: new Date(row.created_at).toISOString(),
};
}