diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/data/remote/MyPageApi.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/data/remote/MyPageApi.kt index 09d9e44d..d9bf47e5 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/data/remote/MyPageApi.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/data/remote/MyPageApi.kt @@ -7,23 +7,17 @@ import com.avengers.nibobnebob.data.model.response.MyInfoResponse import retrofit2.Response import retrofit2.http.Body import retrofit2.http.GET -import retrofit2.http.Header import retrofit2.http.PUT interface MyPageApi { @GET("api/user/details") - suspend fun getMyInfo( - @Header("Authorization") token: String, - ): Response> + suspend fun getMyInfo(): Response> @GET("api/user") - suspend fun getMyDefaultInfo( - @Header("Authorization") token: String, - ): Response> + suspend fun getMyDefaultInfo(): Response> @PUT("api/user") suspend fun editMyInfo( - @Header("Authorization") token: String, @Body data: EditMyInfoRequest ): Response diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/data/repository_impl/MyPageRepositoryImpl.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/data/repository_impl/MyPageRepositoryImpl.kt index 73576e5c..bb6bdb55 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/data/repository_impl/MyPageRepositoryImpl.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/data/repository_impl/MyPageRepositoryImpl.kt @@ -13,22 +13,20 @@ import kotlinx.coroutines.flow.flow import javax.inject.Inject class MyPageRepositoryImpl @Inject constructor(private val api: MyPageApi) : MyPageRepository { - private val token = - "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiaWQiOjIsImlhdCI6MjAxNjIzOTAyMn0.VMvtPcawKVzNyOV08lrArxUvM-XxowWIknsPFkjRTws" override fun getMyInfo(): Flow>> = flow { - val result = runRemote { api.getMyInfo(token) } + val result = runRemote { api.getMyInfo() } emit(result) } override fun getMyDefaultInfo(): Flow>> = flow { - val result = runRemote { api.getMyDefaultInfo(token) } + val result = runRemote { api.getMyDefaultInfo() } emit(result) } override fun editMyInfo(data: EditMyInfoRequest): Flow> = flow { - val result = runRemote { api.editMyInfo(token, data) } + val result = runRemote { api.editMyInfo( data) } emit(result) }