Skip to content

Commit

Permalink
docs: Update session middleware docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sixcolors committed Sep 8, 2024
1 parent 12b219a commit 6812fc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/middleware/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ We recommend using the `Middleware` handler for better integration with other mi
## Migration Guide

### v2 to v3

Check failure on line 38 in docs/middleware/session.md

View workflow job for this annotation

GitHub Actions / markdownlint

Headings should be surrounded by blank lines

docs/middleware/session.md:38 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### v2 to v3"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md022.md

- The `New` function signature has changed in v3. It now returns a `*Middleware` instead of a `*Store`. You can access the store using the `Store` method on the `*Middleware` or by using the `NewWithStore` function.
- In version 3, the `New` function signature has been updated. It now returns a Fiber middleware handler instead of a `*Store`. To access the store, you can use the `Store` method on the `*Middleware` (obtained by calling `session.FromContext(c)` in a handler where the middleware is applied) or utilize the `NewWithStore` function.

Check failure on line 39 in docs/middleware/session.md

View workflow job for this annotation

GitHub Actions / markdownlint

Lists should be surrounded by blank lines

docs/middleware/session.md:39 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- In version 3, the `New` func..."] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md032.md

While it's still possible to work with the `*Store` directly, we recommend using the `Middleware` handler for better integration with other Fiber middlewares.

Expand Down

0 comments on commit 6812fc4

Please sign in to comment.