Fix the inconsistent indentation
The code was actually a mess regarding the indentation! So now it uses 2 spaces Also, there was an issue with the Anilist information Some MediaLists can have the properties of startedAt set to null So we filter out such MediaLists Guess it only applies to imported animes, so it shouldn't matter much
This commit is contained in:
parent
abeeb2d7c1
commit
121fcb02cc
16 changed files with 404 additions and 403 deletions
|
@ -12,7 +12,7 @@ const handler: Handler = async (event, context) => {
|
|||
body: JSON.stringify({
|
||||
query: `
|
||||
query ($userName: String) {
|
||||
MediaList (userName: $userName, type: ANIME, sort: UPDATED_TIME_DESC) {
|
||||
MediaList (userName: $userName, type: ANIME, startedAt_greater: 1, sort: UPDATED_TIME_DESC) {
|
||||
media {
|
||||
title {
|
||||
romaji
|
||||
|
@ -44,8 +44,9 @@ const handler: Handler = async (event, context) => {
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
if (anilist.status !== 200) {
|
||||
// log the issue in netlify, return 404 to the user anyway
|
||||
console.log(await anilist.json())
|
||||
return {
|
||||
statusCode: 404,
|
||||
body: ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue