All checks were successful
Frontend CI / build (push) Successful in 1m9s
### Description - Endpoint: GET `/me`, returns the whole user data. ### Package Changes _No response_ ### Screenshots _No response_ ### Reference Resolves #100 ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #102 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
19 lines
497 B
Rust
19 lines
497 B
Rust
use async_trait::async_trait;
|
|
|
|
use crate::{
|
|
adapter::gateway::user_db_mapper::UserMapper, application::error::auth_error::AuthError,
|
|
};
|
|
|
|
#[async_trait]
|
|
pub trait UserDbService: Send + Sync {
|
|
async fn get_user_by_id(&self, user_id: i32) -> Result<UserMapper, AuthError>;
|
|
|
|
async fn get_user_by_source_id(
|
|
&self,
|
|
issuer: &str,
|
|
source_id: &str,
|
|
) -> Result<UserMapper, AuthError>;
|
|
|
|
async fn create_user(&self, user: UserMapper) -> Result<i32, AuthError>;
|
|
}
|