feat: add more error handling
This commit is contained in:
@@ -7,7 +7,7 @@ export function getAmvstrmSearchResults() {
|
||||
const url = new URL(urlString);
|
||||
const query = url.searchParams.get("q");
|
||||
|
||||
if (!query) {
|
||||
if (!query || query === "a") {
|
||||
return HttpResponse.json({
|
||||
code: 200,
|
||||
message: "success",
|
||||
|
||||
@@ -4,7 +4,7 @@ export function getAnilistSearchResults() {
|
||||
return graphql.query("Search", ({ variables: { query, page } }) => {
|
||||
console.log(`Intercepting Search query with ${query} and page ${page}`);
|
||||
|
||||
if (!query || query === "amvstrm") {
|
||||
if (!query || query === "a" || query === "amvstrm") {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
Page: {
|
||||
|
||||
Reference in New Issue
Block a user