Correction TP 6 - P1

This commit is contained in:
Chocolaterie
2025-01-27 16:56:31 +01:00
parent e7d5b82ebe
commit 4a0be3b9d2
5 changed files with 90 additions and 11 deletions

View 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) }
}
}