Feature/request manager remove get client usage (#325)
* Remove "getClient" usage from "metadata" util * Remove "getClient" usage from "useRefreshManga" hook * Remove "getClient" usage from "isDupChapter" util function * Use correct endpoint for setting category metadata "/meta" suffix was missing from url * Use correct http method for updating manga metadata
This commit is contained in:
@@ -29,11 +29,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
|
||||
const isDupChapter = async (chapterIndex: number, currentChapter: IChapter) => {
|
||||
const nextChapter = (
|
||||
await requestManager
|
||||
.getClient()
|
||||
.get<IChapter>(`/api/v1/manga/${currentChapter.mangaId}/chapter/${chapterIndex}`)
|
||||
).data;
|
||||
const nextChapter = await requestManager.getChapter(currentChapter.mangaId, chapterIndex).response;
|
||||
|
||||
return nextChapter.chapterNumber === currentChapter.chapterNumber;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user