Skip to content

Commit

Permalink
Merge pull request #60 from re-Mine/fix-stash2
Browse files Browse the repository at this point in the history
fix: 코드 리팩토링
  • Loading branch information
alotofhee authored Feb 21, 2024
2 parents 94a3ce3 + dbacc34 commit 4596803
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/remine/retrofit/API.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.remine.retrofit
object API {
const val BASE_URL : String = "https://www.remine.site:8080/"

const val AUTH_SIGN_UP : String = "auth/shop-owner/sign-up"
const val DECLARATION : String = "/api/v1/declarations"

}

Expand Down
10 changes: 2 additions & 8 deletions app/src/main/java/com/remine/retrofit/IRetrofit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ import retrofit2.http.Part

interface IRetrofit {

// @POST("a")
// fun tokenRefresh(@Body refreshTokenArray : String): Call<AuthRes>
//
//
// // 사장 회원가입
@GET("/api/v1/declarations")
@GET(API.DECLARATION)
fun getDeclarations(): Call<DeclarationResponse>

@Multipart
@POST("/api/v1/declarations")
@POST(API.DECLARATION)
fun postDeclarations(@Part file: MultipartBody.Part,@Part("content") content: RequestBody): Call<JsonElement>


}
2 changes: 1 addition & 1 deletion app/src/main/java/com/remine/retrofit/RetrofitClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ class TokenAuthenticator: Authenticator {
null // 만약 토큰 재발급이 실패했다면 헤더에 아무것도 추가하지 않는다.
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,13 @@ class DeclarationMainFragment : Fragment(), DeclarationAdapter.OnItemClickListen

binding.tvDeclDescription.text = timeText

timeText = SpannableStringBuilder(binding.tvTop.text.toString())
val startIndex2 = 0
val endIndex2 = timeText.indexOf("")
timeText.replace(startIndex2, endIndex2, result.result.memberName)
binding.tvTop.text = timeText
// timeText = SpannableStringBuilder(binding.tvTop.text.toString())
// val startIndex2 = 0
// val endIndex2 = timeText.indexOf("님")
// timeText.replace(startIndex2, endIndex2, result.result.memberName)
// binding.tvTop.text = timeText
setTextColor()
}
// Log.d("membername", result.result.memberName + " " + result.result.todayParticipantsCount.toString())
// bundle?.putString("memberName", result.result.memberName)
// bundle?.putInt("participants", result.result.todayParticipantsCount)

Log.d("retrofit", "DeclarationMainFragment - onCreateView() called / 선언 조회 성공 ${result.toString()}")
}
Expand Down

0 comments on commit 4596803

Please sign in to comment.