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

セッションのセーブ、ロード等実装 #41

Merged
merged 3 commits into from
Oct 29, 2024
Merged

Conversation

kenken714
Copy link
Collaborator

関連Issue

概要

セッションのセーブ、削除、id によるロードを実装しました。

変更内容

  • create_session, delete_session, get_user_id_by_session_id

補足

Copy link
Collaborator

@PonponJuice PonponJuice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

気になったので

pub async fn delete_session(&self, session_id: &str) -> anyhow::Result<Option<()>> {
let Some(session) = self
.session_store
.load_session(session_id.to_string())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここだけto_stringになってるの気になる

Suggested change
.load_session(session_id.to_string())
.load_session(session_id.to_owned())

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全部to_string でもいい?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全て合わせるんだったらどっちでもいいよ

@kenken714
Copy link
Collaborator Author

なおしました

@kenken714 kenken714 mentioned this pull request Oct 28, 2024
@PonponJuice
Copy link
Collaborator

なおしました

これ、全ファイルの意だった

@kenken714
Copy link
Collaborator Author

なおしました

これ、全ファイルの意だった
あれ、まだある?

@PonponJuice
Copy link
Collaborator

util/mail.rs とか repository/jwt.rs とかにもto_ownedがある

@kenken714
Copy link
Collaborator Author

なおした

Copy link
Collaborator

@PonponJuice PonponJuice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

良さそうです

@kenken714 kenken714 merged commit e1e6dd9 into develop Oct 29, 2024
1 check passed
@kenken714 kenken714 deleted the feat/session branch October 29, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants