Skip to content

Commit

Permalink
[FIX] 커뮤니티 게시글 삭제 API에서 response body가 없는 상황 대응 (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimhyeing committed Aug 7, 2024
1 parent e870fcb commit 43b228c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/org/sopt/havit/data/api/HavitApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.sopt.havit.domain.entity.CommunityPost
import org.sopt.havit.domain.entity.CommunityPostRequest
import org.sopt.havit.domain.entity.Contents
import org.sopt.havit.domain.entity.Notice
import retrofit2.Response
import retrofit2.http.*

interface HavitApi {
Expand Down Expand Up @@ -182,5 +183,5 @@ interface HavitApi {
@DELETE("community/{communityPostId}")
suspend fun deleteCommunityPost(
@Path("communityPostId") communityPostId: Int
): BasicResponse
): Response<Unit>
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CommunityViewModel @Inject constructor(
kotlin.runCatching {
communityRepository.postCommunityReport(id)
}.onFailure {
Log.e("CommunityViewModel", "Community Post Id $id 의 삭제 에러")
Log.e("CommunityViewModel", "Community Post Id $id 의 삭제 에러 : ${it.message}")
}
}
}
Expand All @@ -70,7 +70,7 @@ class CommunityViewModel @Inject constructor(
kotlin.runCatching {
communityRepository.deleteCommunityPost(id)
}.onFailure {
Log.e("CommunityViewModel", "Community Delete Id $id 의 삭제 에러")
Log.e("CommunityViewModel", "Community Delete Id $id 의 삭제 에러 : ${it.message}")
}
}
}
Expand Down

0 comments on commit 43b228c

Please sign in to comment.