Skip to content

Commit

Permalink
#7 Feature: User Service
Browse files Browse the repository at this point in the history
  • Loading branch information
0se0 committed Nov 14, 2024
1 parent 9e8ad27 commit e3d474b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions app/src/main/java/org/sopt/and/network/UserService.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.sopt.and.network

import org.sopt.and.network.request.RequestLoginDto
import org.sopt.and.network.request.RequestSignUpDto
import org.sopt.and.network.response.ResponseDto
import org.sopt.and.network.response.ResponseHobbyDto
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST

interface UserService {
@POST("/user")
suspend fun postSignUp(
@Body request: RequestSignUpDto
): Response<ResponseDto>

@POST("/login")
suspend fun postLogin(
@Body request: RequestLoginDto
): Response<ResponseDto>

@GET("/user/my-hobby")
suspend fun getHobby(
@Header("token") token: String
): Response<ResponseHobbyDto>
}

0 comments on commit e3d474b

Please sign in to comment.