From 4919ee44ea00f7a404894210d8f429f9d28cce3c Mon Sep 17 00:00:00 2001 From: shaokeyibb Date: Wed, 17 Jul 2024 19:24:57 +0800 Subject: [PATCH] feat(workers): return id in resp --- cloudflare-workers/src/db.ts | 1 + cloudflare-workers/src/types.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/cloudflare-workers/src/db.ts b/cloudflare-workers/src/db.ts index 5279ba2e..6f17f38e 100644 --- a/cloudflare-workers/src/db.ts +++ b/cloudflare-workers/src/db.ts @@ -52,6 +52,7 @@ export async function getComment(env: Env, req: GetComment): Promise { return { + id: comment.id as number, offset: { start: comment.start as number, end: comment.end as number, diff --git a/cloudflare-workers/src/types.ts b/cloudflare-workers/src/types.ts index 9e1128a0..853094a9 100644 --- a/cloudflare-workers/src/types.ts +++ b/cloudflare-workers/src/types.ts @@ -26,6 +26,7 @@ export type GetCommentBody = { export type GetComment = GetCommentBody; export type GetCommentRespBody = { + id: number; offset: { start: number; end: number;