Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/nutriomatic/mobile-app into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
habibfr committed Jun 20, 2024
2 parents fd0f7cc + 53a6b73 commit cf43cf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ interface ApiService {

@GET("scanned-nutrition/")
suspend fun getNutritionScanByUserId(
@Query("desc") desc: Int = 1,
@Query("sort") sort: String = "created_at",
@Query("pageSize") pageSize: Int = 20,
@Query("page") page: Int = 1,
): GetNutritionScanByUserIdResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NutritionScanPagingSource(private val apiService: ApiService) :
return try {
val position = params.key ?: INITIAL_PAGE_INDEX
val responseData =
apiService.getNutritionScanByUserId(params.loadSize, position)
apiService.getNutritionScanByUserId(1, "created_at", params.loadSize, position)

LoadResult.Page(
data = responseData.nutritionScans,
Expand Down

0 comments on commit cf43cf9

Please sign in to comment.