Browse Source

Worked on hilt dependency injection, created structed with clean architecture for splash

Khubaib 2 months ago
parent
commit
9c67519f71

+ 11 - 11
app/src/main/java/com/fastest/pass/di/AppModule.kt

@@ -6,14 +6,14 @@ import dagger.hilt.InstallIn
 import dagger.hilt.components.SingletonComponent
 import javax.inject.Singleton
 
-@InstallIn(SingletonComponent::class)
-@Module
-object AppModule {
-
-    @Singleton
-    @Provides
-    fun provideApiService() {
-
-    }
-
-}
+//@InstallIn(SingletonComponent::class)
+//@Module
+//object AppModule {
+//
+//    @Singleton
+//    @Provides
+//    fun provideApiService() {
+//
+//    }
+//
+//}

+ 8 - 1
app/src/main/java/com/fastest/pass/splash/data/source/remote/ApiService.kt

@@ -1,8 +1,15 @@
 package com.fastest.pass.splash.data.source.remote
 
+import retrofit2.http.FormUrlEncoded
 import retrofit2.http.POST
+import retrofit2.http.Query
+import retrofit2.Call
 
 interface ApiService {
+
+    @FormUrlEncoded
     @POST("login")
-    suspend fun login()
+    suspend fun login(
+        @Query("email") email: String?, @Query("password") password: String?
+    ): Call<Any?>
 }