-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(api): [#183] Axum API, user context, login
- Loading branch information
1 parent
a341e38
commit 3f639b3
Showing
6 changed files
with
137 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
// Registration | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct RegistrationForm { | ||
pub username: String, | ||
pub email: Option<String>, | ||
pub password: String, | ||
pub confirm_password: String, | ||
} | ||
|
||
// Authentication | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct LoginForm { | ||
pub login: String, // todo: rename to `username` after finishing Axum API migration. | ||
pub password: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters