Skip to content

Commit

Permalink
docs(readme): typo and wrong license link
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEdoRan committed Apr 16, 2023
1 parent 9167efd commit 94d87eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ declare module "next-safe-mutation" {
```


Then, when creating the safe mutation client, you **must** provide an `async function` called `getAuthData` as an option. The return type of this function depends on the interface you just declared. For example, this functions must return an object with an `userId` key of type `string`. If you find out that the user is not authenticated, you can safely throw an error here. It will be caught, and a response with `{ serverError: true }` is returned to the client.
Then, when creating the safe mutation client, you **must** provide an `async function` called `getAuthData` as an option. The return type of this function depends on the interface you just declared. For example, this function must return an object with an `userId` key of type `string`. If you find out that the user is not authenticated, you can safely throw an error here. It will be caught, and a response with `{ serverError: true }` is returned to the client.

```typescript
// src/app/lib/safe-mutation.ts
Expand Down Expand Up @@ -264,4 +264,4 @@ export { safeMutation };

## License

This project is licensed under the [MIT License](https://github.com/TheEdoRan/seuid/blob/main/LICENSE).
This project is licensed under the [MIT License](https://github.com/TheEdoRan/next-safe-mutation/blob/main/LICENSE).

0 comments on commit 94d87eb

Please sign in to comment.