Skip to content

Commit

Permalink
Debug Search Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Hossara committed Jun 15, 2022
1 parent d4a5113 commit 8f382cd
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,11 @@ class SearchController(

val indexItems = mapResult.chunked(6)

/*
* Todo
* Index 0 out of bounds for length 0
*/

// Convert Result To Json
val jsonSearchResult = Gson()
.toJson({
if(indexItems.isNotEmpty()) mutableListOf(indexItems.size, indexItems[page - 1])
else mutableListOf()
else mutableListOf(0, emptyList<Any>())
})

// Send Result To Client
Expand Down

0 comments on commit 8f382cd

Please sign in to comment.