-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove useless from_str for db enums
- Loading branch information
1 parent
ab1f934
commit 780d290
Showing
9 changed files
with
13 additions
and
51 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
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,10 +1,10 @@ | ||
use crate::dto::device::internal::DeviceInfo; | ||
use crate::{data::enums::OAuthProvider, dto::device::internal::DeviceInfo}; | ||
use serde::{Deserialize, Serialize}; | ||
use utoipa::ToSchema; | ||
|
||
#[derive(Debug, Serialize, Deserialize, Clone, ToSchema)] | ||
pub struct AuthorizeRequest { | ||
pub code: String, | ||
pub provider: String, | ||
pub provider: OAuthProvider, | ||
pub device: DeviceInfo, | ||
} |
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,10 +1,11 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use utoipa::ToSchema; | ||
use crate::data::enums::OS; | ||
|
||
#[derive(Debug, Serialize, Deserialize, ToSchema, Clone)] | ||
pub struct DeviceInfo { | ||
#[schema(example = "Android")] | ||
pub os: String, | ||
pub os: OS, | ||
#[schema(example = "Vitya Phone")] | ||
pub name: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
use crate::data::enums::Country; | ||
use serde::{Deserialize, Serialize}; | ||
use utoipa::ToSchema; | ||
|
||
#[derive(Debug, Serialize, Deserialize, ToSchema, Clone)] | ||
pub struct CreateSession { | ||
pub country: String, | ||
pub country: Country, | ||
} |
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