refactor(api): make SearchConverter a singleton

This commit is contained in:
Harsh Shandilya 2023-07-18 17:11:06 +05:30
parent cf3ca27966
commit bad5bf5457
2 changed files with 6 additions and 8 deletions

View file

@ -20,10 +20,9 @@ class SearchApiWrapper(controller: EitherNetController<LobstersSearchApi>) {
init {
controller.enqueue(LobstersSearchApi::searchPosts) {
success(
SearchConverter()
.convert(
ResponseBody.create(MediaType.get("text/html"), getResource("search_chatgpt_page.html"))
)
SearchConverter.convert(
ResponseBody.create(MediaType.get("text/html"), getResource("search_chatgpt_page.html"))
)
)
}
}