BLOG-94 Create user in DB when first login through OIDC #96

Merged
squid merged 4 commits from BLOG-94_create_user_when_first_login into main 2025-08-01 13:24:09 +08:00
4 changed files with 4 additions and 4 deletions
Showing only changes of commit 8f8857ee8e - Show all commits

View File

@ -8,7 +8,7 @@ pub struct ImageRequestDto {
impl ImageRequestDto {
pub fn into_entity(self) -> Image {
Image {
id: None,
id: -1,
mime_type: self.mime_type,
data: self.data,
}

View File

@ -1,7 +1,7 @@
use crate::domain::entity::image::Image;
pub struct ImageDbMapper {
pub id: Option<i32>,
pub id: i32,
pub mime_type: String,
}

View File

@ -1,5 +1,5 @@
pub struct Image {
pub id: Option<i32>,
pub id: i32,
pub mime_type: String,
pub data: Vec<u8>,
}

View File

@ -54,7 +54,7 @@ impl ImageDbService for ImageDbServiceImpl {
match image_record {
Ok(record) => match record {
Some(record) => Ok(ImageDbMapper {
id: Some(record.id),
id: record.id,
mime_type: record.mime_type,
}),
None => Err(ImageError::NotFound),