Skip to content

v5.1.2

Compare
Choose a tag to compare
@Albert-Gao Albert-Gao released this 07 Jun 11:17
· 6 commits to master since this release
  • feat: make success(), badRequest() and interError() more easier to call

now you can just success({name: 'albert'}), a HTTP 200 with HTTP body {name:'albert'} will be returned
If you want to change the statusCode and headers, you can add an 2nd parameter when invoking like:
success({name:'albert'}, {statusCode: 201, headers: { hidden: 1 }})