diff options
Diffstat (limited to 'src/graphql/types.rs')
| -rw-r--r-- | src/graphql/types.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/graphql/types.rs b/src/graphql/types.rs deleted file mode 100644 index 79241df..0000000 --- a/src/graphql/types.rs +++ /dev/null @@ -1,29 +0,0 @@ -use async_graphql::Object; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct User { - pub id: i32, - pub email: String, - pub password: String, - pub is_admin: bool, -} - -#[Object] -impl User { - async fn id(&self) -> i32 { - self.id - } - - async fn email(&self) -> String { - self.email.clone() - } - - async fn password(&self) -> String { - String::from("******") - } - - async fn is_admin(&self) -> bool { - self.is_admin - } -} |
