Skip to content

Commit

Permalink
Update migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
lakhansamani committed Dec 26, 2023
1 parent 4fa2ad5 commit 1332f9f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ It supports:
- [CommonJS(cjs)](https://flaviocopes.com/commonjs/) build for NodeJS version that don't support ES Modules
- [ESM (ES Modules)](https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/) build for modern javascript standard, i.e. ES Modules

# Migration from 1.x -> 2.x
# Migration Guide from 1.x -> 2.x

`2.x` version of `@authorizerdev/authorizer-js` has a uniform response structure that will help your applications to get right error codes and success response. Methods here have `{data, errors}` as response object for methods of this library
`2.x` version of `@authorizerdev/authorizer-js` has a uniform response structure that will help your applications to get right error codes and success response. Methods here have `{data, errors}` as response objects for methods of this library.

For `1.x` version of this library you can get only data in response and error would be thrown so you had to handle that in catch.

---

All the above versions require `Authorizer` instance to be instantiated and used. Instance constructor requires an object with the following keys

Expand Down

0 comments on commit 1332f9f

Please sign in to comment.