Skip to content

Commit 4ec99a8

Browse files
authored
Merge pull request #118 from Team-NumberOne/fix/api5
api 버그 수정
2 parents a91a8dc + e46333d commit 4ec99a8

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/main/kotlin/com/numberone/daepiro/domain/disasterSituation/dto/response/DisasterSituationResponse.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ data class DisasterSituationResponse(
1313
@Schema(description = "재난 종류", example = "호우")
1414
val type: String,
1515

16+
@Schema(description = "재난 종류 id", example = "호우")
17+
val typeId: Long,
18+
1619
@Schema(description = "제목", example = "서울특별시 성북구 쌍문동 호우 발생")
1720
val title: String,
1821

@@ -43,6 +46,7 @@ data class DisasterSituationResponse(
4346
): DisasterSituationResponse {
4447
return DisasterSituationResponse(
4548
id = article.id!!,
49+
typeId = article.disasterType!!.id!!,
4650
type = article.disasterType!!.type.korean,
4751
title = article.title,
4852
content = article.body,

src/main/kotlin/com/numberone/daepiro/domain/user/entity/UserEntity.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,13 @@ class UserEntity(
8787
) {
8888
this.realname = realname
8989
this.nickname = nickname
90-
this.profileImageUrl = "https://daepiro-dev.s3.ap-northeast-2.amazonaws.com/article/profile/" + (Random.nextInt(
91-
1,
92-
8
93-
)) + ".png"
90+
if (this.profileImageUrl == null) {
91+
this.profileImageUrl =
92+
"https://daepiro-dev.s3.ap-northeast-2.amazonaws.com/article/profile/" + (Random.nextInt(
93+
1,
94+
8
95+
)) + ".png"
96+
}
9497
}
9598

9699
fun initFcmToken(fcmToken: String?) {

0 commit comments

Comments
 (0)