Skip to content

Commit

Permalink
Erros can be anything
Browse files Browse the repository at this point in the history
  • Loading branch information
avdb committed Jan 19, 2024
1 parent 16e8325 commit 34c27e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export const badRequest = (text = 'Bad Request') => ({
text,
})

export const json = (body: { message: string; errors: [Error] }, status = OK) => ({
export const json = (body: { message: string; errors: any }, status = OK) => ({
status,
body,
})

export const badRequestJson = (result: { message: string; errors: [Error] }) =>
export const badRequestJson = (result: { message: string; errors: any }) =>
json(result, BAD_REQUEST)

0 comments on commit 34c27e1

Please sign in to comment.