-
Notifications
You must be signed in to change notification settings - Fork 3
[API] Rooms 나머지 API 연결 #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1e5ca34
680b677
df1145c
abcd20d
a5ed77e
f801bf1
ee4f79d
35c082f
fed3945
bf0940e
7053d31
ffb686d
5082439
2715edb
f8d1492
f3fb5cb
ff68ffc
c43d7d4
8b573e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.texthip.thip.data.model.rooms.request | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
|
|
||
| @Serializable | ||
| data class RoomSecreteRoomRequest( | ||
| @SerialName("password") val password: String | ||
| ) | ||
|
Comment on lines
+8
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chain레포지토리 전반 ‘Secrete’ 오타 사용 여부 점검 필요 동일 오타가 퍼져 있을 가능성이 큽니다. 일괄 정정 여부를 확인해주세요. 예상 결과
🏁 Script executed: #!/bin/bash
# 레포지토리 전체에서 'Secrete' 오타 사용 위치 탐색
rg -n --hidden -S 'Secrete|RoomSecreteRoomRequest|postParticipateSecreteRoom' -g '!*build*' -g '!*gradle*' -A 2Length of output: 4311 🏁 Script executed: #!/bin/bash
# 대소문자 무시하고 'secrete' 오타 전체 탐색
rg -n --hidden -S -i 'secrete' -g '!*build*' -g '!*gradle*' -A 2 || trueLength of output: 4262 'Secrete' 오타 일괄 교정 필요 (→ 'Secret') 레포지토리 전반에서 'Secrete' 오타가 확인되었습니다. 아래 파일/심볼을 클래스명·파일명·메서드명·임포트를 리네임하고 참조를 모두 갱신하세요. API 엔드포인트나 직렬화 키(@SerialName 등)에 영향이 있는지도 같이 확인해주세요. 수정 대상(검색으로 확인된 항목)
권장 작업
🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.texthip.thip.data.model.rooms.response | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class RoomCloseResponse( | ||
| @SerialName("roomId") val roomId: Int | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.texthip.thip.data.model.rooms.response | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
|
|
||
| @Serializable | ||
| data class RoomSecreteRoomResponse( | ||
| @SerialName("matched") val matched: Boolean = false, | ||
| @SerialName("roomId") val roomId: Int = 0 | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.texthip.thip.data.provider | ||
|
|
||
| import android.content.Context | ||
| import androidx.annotation.StringRes | ||
| import dagger.hilt.android.qualifiers.ApplicationContext | ||
| import javax.inject.Inject | ||
| import javax.inject.Singleton | ||
|
|
||
| @Singleton | ||
| class StringResourceProvider @Inject constructor( | ||
| @param:ApplicationContext private val context: Context | ||
| ) { | ||
|
|
||
| fun getString(@StringRes resId: Int): String { | ||
| return context.getString(resId) | ||
| } | ||
|
|
||
| fun getString(@StringRes resId: Int, vararg formatArgs: Any): String { | ||
| return context.getString(resId, *formatArgs) | ||
| } | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package com.texthip.thip.data.repository | ||
|
|
||
| import com.texthip.thip.data.model.base.handleBaseResponse | ||
| import com.texthip.thip.data.model.book.response.RecentSearchResponse | ||
| import com.texthip.thip.data.service.RecentSearchService | ||
| import javax.inject.Inject | ||
| import javax.inject.Singleton | ||
|
|
||
| @Singleton | ||
| class RecentSearchRepository @Inject constructor( | ||
| private val recentSearchService: RecentSearchService | ||
| ) { | ||
|
|
||
| /** 최근 검색어 조회 */ | ||
| suspend fun getRecentSearches(type: String): Result<RecentSearchResponse?> = runCatching { | ||
| recentSearchService.getRecentSearches(type) | ||
| .handleBaseResponse() | ||
| .getOrThrow() | ||
| } | ||
|
|
||
| /** 최근 검색어 삭제 */ | ||
| suspend fun deleteRecentSearch(recentSearchId: Int): Result<Unit> = runCatching { | ||
| recentSearchService.deleteRecentSearch(recentSearchId) | ||
| .handleBaseResponse() | ||
| .getOrThrow() | ||
| ?: Unit | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
클래스/파일명 오타: Secrete → Secret. 네이밍 일관성 및 DX 영향
도메인 용어는 “Secret room”이므로
RoomSecreteRoomRequest표기가 잘못되었습니다. 동일 오타가 서비스/레포지토리/네이게이션 전반에 전파될 수 있어 추후 검색·리팩터링 난이도가 커집니다. 요청 본문에 대한 최소 유효성 검사도 함께 추가하는 것을 권장합니다.아래처럼 클래스명을 바로잡고, 빈 비밀번호 방지를 위한 require를 추가해주세요.
후속 조치
RoomSecretRoomRequest.kt로 변경 권장.postParticipateSecreteRoom) 및 모든 호출부의 오타를 함께 정정 필요.🤖 Prompt for AI Agents