Skip to content

Commit

Permalink
Update responseMessage type (#5)
Browse files Browse the repository at this point in the history
* Update responseMessage type

* Update README.md

* chore: changeset

---------

Co-authored-by: Phumrapee Limpianchop <[email protected]>
  • Loading branch information
tnfAngel and rayriffy authored Nov 26, 2023
1 parent 68a1178 commit d84ebbd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-keys-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'elysia-rate-limit': patch
---

responseMessage type has been changed to `any`, so you can actually return response as anything (i.e. object)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ HTTP reponse code to be sent when rate limit was reached. By default, it will re

### responseMessage

`string`
`any`

Default: `rate-limit reached`

Expand Down
2 changes: 1 addition & 1 deletion src/@types/Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface Options {
responseCode: number

// message response when rate-limit reached (Default: rate-limit reached)
responseMessage: string
responseMessage: any

// should rate limit being counted when request result is failed (Default: false)
countFailedRequest: boolean
Expand Down

0 comments on commit d84ebbd

Please sign in to comment.