Skip to content

Commit

Permalink
[Add/#9] dataSource 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
gaeun5744 committed Jun 1, 2023
1 parent 0a1d0bf commit c0fabf1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.android.go.sopt.remote.remoteData.datasource

import org.android.go.sopt.RequestSignUpDto
import org.android.go.sopt.ResponseSignUpDto
import org.android.go.sopt.remote.domain.LoginPageRepo
import org.android.go.sopt.remote.remoteData.model.MyProfileDto
import org.android.go.sopt.remote.remoteData.model.RequestLogInDto
import org.android.go.sopt.remote.remoteData.model.ResponseLogInDto
import org.android.go.sopt.remote.service.LogInPageService
import retrofit2.Response

class LoginPageDataSource(private val apiService:LogInPageService):LoginPageRepo{
override suspend fun login(request: RequestLogInDto): Response<ResponseLogInDto> {
return apiService.login(request)
}

override suspend fun signUp(request: RequestSignUpDto): Response<ResponseSignUpDto> {
return apiService.signUp(request)
}

override suspend fun myProfile(userId: String): Response<MyProfileDto> {
return apiService.myProfile(userId)
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.android.go.sopt.remote.remoteData.datasource

import org.android.go.sopt.remote.domain.MainPageRepo
import org.android.go.sopt.remote.remoteData.model.ResponseListUsersDto
import org.android.go.sopt.remote.service.MainPageService
import retrofit2.Response

class MainPageDataSource(private val apiService:MainPageService):MainPageRepo {
override suspend fun getUserList(): Response<ResponseListUsersDto> {
return apiService.getListUsers()
}
}

0 comments on commit c0fabf1

Please sign in to comment.