feat: add ApiService for login functionality
This commit is contained in:
parent
cc3326fe8d
commit
a797e0084c
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.syaroful.agrilinkvocpro.data.network
|
||||||
|
|
||||||
|
import com.syaroful.agrilinkvocpro.data.model.LoginResponse
|
||||||
|
import retrofit2.Response
|
||||||
|
import retrofit2.http.Body
|
||||||
|
import retrofit2.http.Header
|
||||||
|
import retrofit2.http.POST
|
||||||
|
|
||||||
|
|
||||||
|
data class LoginRequest(
|
||||||
|
val username: String,
|
||||||
|
val password: String
|
||||||
|
)
|
||||||
|
|
||||||
|
interface ApiService {
|
||||||
|
@POST("auth/login")
|
||||||
|
suspend fun login(
|
||||||
|
@Header("Authorization") authHeader: String,
|
||||||
|
@Body body: LoginRequest
|
||||||
|
): Response<LoginResponse>
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user