feat: create route to return title information
Summary: Test Plan:
This commit is contained in:
12
src/mocks/anify/title.ts
Normal file
12
src/mocks/anify/title.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { HttpResponse, http } from "msw";
|
||||
|
||||
export function getAnifyTitle() {
|
||||
return http.get(`https://api.anify.tv/info`, ({ request }) => {
|
||||
// Construct a URL instance out of the intercepted request.
|
||||
const url = new URL(request.url);
|
||||
const id = url.searchParams.get("id");
|
||||
|
||||
// TODO: Actually return a response
|
||||
return HttpResponse.json({ bannerImage: null, countryOfOrigin: "JP" });
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user