Skip to content

Commit

Permalink
Create response_builder.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx committed Aug 29, 2024
1 parent b39151e commit 01b825b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/response/response_builder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default function responseBuilder(
success : boolean,
result : unknown,
errors : {type : string, message : string}[]
) : Response {
return new Response(JSON.stringify({
success,
result,
errors
}))
}

0 comments on commit 01b825b

Please sign in to comment.