Correction TP 6 - P1
This commit is contained in:
19
app/src/main/java/com/example/tpfilrouge/auth/AuthService.kt
Normal file
19
app/src/main/java/com/example/tpfilrouge/auth/AuthService.kt
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.example.tpfilrouge.auth
|
||||
|
||||
import com.example.tpfilrouge.api.RetrofitTools.Companion.retrofit
|
||||
import com.example.tpfilrouge.api.ServiceResponseDTO
|
||||
import com.example.tpfilrouge.article.Article
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.POST
|
||||
|
||||
interface AuthService {
|
||||
|
||||
@POST("login")
|
||||
suspend fun login(@Body loginRequestDTO: LoginRequestDTO) : ServiceResponseDTO<String>
|
||||
|
||||
object AuthApi {
|
||||
val authService : AuthService by lazy { retrofit.create(AuthService::class.java) }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user