Commit Graph

6 Commits

Author SHA1 Message Date
schroda
0d36d2dcfb Feature/request manager make requests abortable (#316)
* Make requests abortable

* Make requests abortable - Fix usage
2023-05-23 13:27:38 +02:00
schroda
95ceac335b Update to axios v1.x (#315)
Update to axious v1.4.0
2023-05-23 13:25:48 +02:00
schroda
84433ffff8 Support SWR infinite requests via POST (#313)
* Support SWR infinite requests via POST

* Correct "source quick-search" request
2023-05-22 14:04:05 +02:00
schroda
6fd0dd0dad Fix "setSourceFilters" request (#312) 2023-05-22 14:03:50 +02:00
schroda
0cd5720f54 Fix/request manager infinite swr requests (#306)
* Fix RequestManager initial infinite swr requests

Functions always returned "null" as the url, which causes SWR to not send the request

 - useGetSourceLatestMangas
 - useSourceSearch
 - useSourceQuickSearch

* Use "skipRequest" for infinite SWR requests

Is easier to use then overwriting "getEndpoint" only for specific cases

* Request correct first page for infinite SWR requests

The following endpoints start at page 1
 - popular source mangas
 - latest source mangas
 - source search
 - source quick search

* Remove wrong parameter from source manga browse requests

No idea why I've added this in the first place

* Correctly request "latest" and "popular" source mangas

The "page" wasn't a param of the query but part of the endpoint
2023-05-20 13:12:23 +02:00
schroda
a457d80c44 Feature/streamline backend requests (#297)
* Introduce "RequestManager"

* Use "RequestManager" - Simple replacements

 - Get rid of all "util/client" imports
 - replace old requests with new "RequestManager"
 - remove "fetcher" from global SWR config
     instead of using the SWR hooks by themselves, the "requestManager" is supposed to be used

* Use "RequestManager" - Do requests via SWR hooks

Use SWR hooks at places where it's easily usable

* Prevent trailing slashes in the "baseUrl"
2023-05-18 13:25:19 +02:00