Skip to content

Commit

Permalink
feat(workers): return id in resp
Browse files Browse the repository at this point in the history
  • Loading branch information
shaokeyibb committed Jul 17, 2024
1 parent 9704aca commit 4919ee4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cloudflare-workers/src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export async function getComment(env: Env, req: GetComment): Promise<GetCommentR

return comments.map((comment) => {
return {
id: comment.id as number,
offset: {
start: comment.start as number,
end: comment.end as number,
Expand Down
1 change: 1 addition & 0 deletions cloudflare-workers/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type GetCommentBody = {
export type GetComment = GetCommentBody;

export type GetCommentRespBody = {
id: number;
offset: {
start: number;
end: number;
Expand Down

0 comments on commit 4919ee4

Please sign in to comment.