feat: add Consumet as source for /episodes

This commit is contained in:
2024-05-26 13:22:03 -04:00
parent 75bb7615f5
commit 00ff0e0295
9 changed files with 122 additions and 10 deletions

View File

@@ -1,7 +1,12 @@
import { HttpResponse, http } from "msw";
export function getAnifyEpisodes() {
return http.get("https://api.anify.tv/episodes/:aniListId", () => {
return http.get("https://api.anify.tv/episodes/:aniListId", ({ params }) => {
const aniListId = Number(params["aniListId"]);
if (aniListId === 3 || aniListId < 0) {
return HttpResponse.json([]);
}
return HttpResponse.json([
{
providerId: "zoro",