From 49190d6ada3814ab92c8a09ab082ef26304f80fc Mon Sep 17 00:00:00 2001 From: WooJin Kong Date: Sun, 4 Aug 2024 12:04:36 +0900 Subject: [PATCH] fix: Fix statusCode hard-coded to 404 --- .../com/kongjak/koreatechboard/data/mapper/ArticleMapper.kt | 2 +- .../java/com/kongjak/koreatechboard/data/mapper/BoardMapper.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/src/main/java/com/kongjak/koreatechboard/data/mapper/ArticleMapper.kt b/data/src/main/java/com/kongjak/koreatechboard/data/mapper/ArticleMapper.kt index b22cf9e..5318256 100644 --- a/data/src/main/java/com/kongjak/koreatechboard/data/mapper/ArticleMapper.kt +++ b/data/src/main/java/com/kongjak/koreatechboard/data/mapper/ArticleMapper.kt @@ -10,7 +10,7 @@ fun ArticleResponse?.mapToArticle(code: Int): ResponseResult
{ if (this == null) { return ResponseResult.Success( Article( - statusCode = 404, + statusCode = code, title = "", writer = "", content = "", diff --git a/data/src/main/java/com/kongjak/koreatechboard/data/mapper/BoardMapper.kt b/data/src/main/java/com/kongjak/koreatechboard/data/mapper/BoardMapper.kt index 0b2062e..ce0723b 100644 --- a/data/src/main/java/com/kongjak/koreatechboard/data/mapper/BoardMapper.kt +++ b/data/src/main/java/com/kongjak/koreatechboard/data/mapper/BoardMapper.kt @@ -10,7 +10,7 @@ fun BoardResponse?.mapToBoard(code: Int): ResponseResult { return ResponseResult.Success( BoardResponse( lastPage = 1, - statusCode = 404, + statusCode = code, boardData = emptyList() ) )