From 2911435663ca9bdbf685f59286a0f20ab02a14a5 Mon Sep 17 00:00:00 2001 From: Danya_Mochalov Date: Sat, 23 Dec 2023 18:42:11 +0400 Subject: [PATCH] minor fix 2 --- .../shawarma/data/api/mediators/ProductRemoteMediator.kt | 1 - .../com/example/shawarma/data/api/repos/RestUserRepository.kt | 4 ---- 2 files changed, 5 deletions(-) diff --git a/app/src/main/java/com/example/shawarma/data/api/mediators/ProductRemoteMediator.kt b/app/src/main/java/com/example/shawarma/data/api/mediators/ProductRemoteMediator.kt index 6646a49..5fc67f5 100644 --- a/app/src/main/java/com/example/shawarma/data/api/mediators/ProductRemoteMediator.kt +++ b/app/src/main/java/com/example/shawarma/data/api/mediators/ProductRemoteMediator.kt @@ -54,7 +54,6 @@ class ProductRemoteMediator ( else -> {ProductListResponse()} } - database.withTransaction { if (loadType == LoadType.REFRESH) { productDao.deleteByQuery(query) diff --git a/app/src/main/java/com/example/shawarma/data/api/repos/RestUserRepository.kt b/app/src/main/java/com/example/shawarma/data/api/repos/RestUserRepository.kt index 27bbfde..1bae05f 100644 --- a/app/src/main/java/com/example/shawarma/data/api/repos/RestUserRepository.kt +++ b/app/src/main/java/com/example/shawarma/data/api/repos/RestUserRepository.kt @@ -21,8 +21,4 @@ class RestUserRepository @Inject constructor( suspend fun checkLogin(user: UserModel): UserModelRemote? { return service.checkLogin(user.toUserModelRemote()) } - - suspend fun getUser(token: String) : UserModelRemote? { - return service.getUser(token) - } } \ No newline at end of file