Skip to content

Profile 모듈 분리#272

Merged
Maybeiley merged 3 commits intodevfrom
Feat/#261-new-profile-module
Feb 24, 2025
Merged

Profile 모듈 분리#272
Maybeiley merged 3 commits intodevfrom
Feat/#261-new-profile-module

Conversation

@Maybeiley
Copy link
Contributor

작업한 이슈 번호

작업 사항 설명

현재 User, Auth 모듈에서 사용하는 Profile 관련 메서드를 Profile 모듈로 분리합니다.

작업 사항

  • Profile 모듈 구현

기타

@Maybeiley Maybeiley added the 기능 New feature or request label Feb 23, 2025
@Maybeiley Maybeiley self-assigned this Feb 23, 2025
Comment on lines +43 to +49
) {
if (role === 'DREAMER') {
return await this.service.updateDreamerProfile(userId, data);
}
return await this.service.updateMakerProfile(userId, data);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dreamer 하드코딩되어있어요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗, 예전 코드 그대로 가져오다보니 ㅠㅠ 수정해서 올릴게요~

Comment on lines +13 to +21
async getProfile(role: string, userId: string): Promise<DreamerProfileProperties | MakerProfileProperties> {
if (role === 'DREAMER') {
const profile = await this.repository.findDreamerProfile(userId);
return profile.get();
}

const profile = await this.repository.findMakerProfile(userId);
return profile.get();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 드리머 하듴됭되어있어요

Comment on lines +11 to +21
async findDreamerProfile(userId: string): Promise<IDreamerProfile> {
const data = await this.db.dreamerProfile.findUnique({
where: {
userId
}
});

if (data) {
return new DreamerProfileMapper(data).toDomain();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 지금까지 해온거는 레포에서는 리턴해주고 맵퍼에서 없는걸 처리해주지 않나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋ 초기에 만든거라 그렇네요 ㅋㅋㅋ 수정하겠습니다~!

@Maybeiley Maybeiley merged commit 6a92693 into dev Feb 24, 2025
1 check passed
@Maybeiley Maybeiley deleted the Feat/#261-new-profile-module branch February 24, 2025 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능 New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile 모듈 분리

2 participants