Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第二部 - セッション管理機構の実装 #47

Merged
merged 7 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/chapter2/section1/0_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DB_DATABASE="world"
4. 以下のコマンドを実行し、クレートの依存関係を追加しましょう。

```sh
$ cargo add axum anyhow serde serde_json tokio bcrypt --features tokio/full,serde/derive,axum/macros
$ cargo add axum axum-extra anyhow serde serde_json tokio bcrypt --features tokio/full,serde/derive,axum/macros,axum-extra/typed-header
$ cargo add async-session tracing tracing-subscriber --features tracing-subscriber/env-filter,tracing-subscriber/fmt
$ cargo add tower-http --features add-extension,trace,fs
```
Expand Down
3 changes: 3 additions & 0 deletions docs/chapter2/section1/1_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ pub async fn sign_up(
::: code-group
<<<@/chapter2/section1/src/1_account/auth.rs{rs:line-numbers}[auth.rs]
<<<@/chapter2/section1/src/1_account/users.rs{rs:line-numbers}[users.rs]
<<<@/chapter2/section1/src/1_account/main.rs{rs:line-numbers}[main.rs]
<<<@/chapter2/section1/src/1_account/repository.rs{rs:line-numbers}[repository.rs]
:::

最後に、`handler.rs` に、先ほど書いたハンドラーを追加しましょう。
Expand Down Expand Up @@ -413,6 +415,7 @@ $ task db
```sql
mysql> USE world;
mysql> SELECT * FROM users;
mysql> SELECT * FROM user_passwords;
```
![](images/3/database1-user.png)

Expand Down
Loading