Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@ data class MindRecordDetail(

/**
* 데일리 질문 조회 응답 (GET /daily-question)
* 오늘 날짜 기준으로 서버가 1개의 질문을 반환합니다.
* API 스펙: { questionId, content }
* API 응답: { status, code, message, data: { questionId, content } }
*/
@Serializable
data class DailyQuestionResponse(
val status: Int,
val code: Int,
val message: String,
val data: DailyQuestionDataDto?
)

@Serializable
data class DailyQuestionDataDto(
val questionId: Long,
val content: String
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class MindRecordRepositoryImpl @Inject constructor(
) : MindRecordRepository {
override suspend fun getDailyQuestion(): DailyQuestionData? = try {
val response = apiService.getDailyQuestion()
DailyQuestionData(questionId = response.questionId, content = response.content)
response.data?.let { dto ->
DailyQuestionData(questionId = dto.questionId, content = dto.content)
}
} catch (e: Exception) {
null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,5 @@ constructor(
CODE_SPECIFIC_DATE -> TriggerConditionOption.SpecificDate
CODE_RECEIVER_REQUEST -> TriggerConditionOption.ReceiverRequest
else -> TriggerConditionOption.AppInactivity
}
}g
}
Loading