infanf / myanili

MyAnimeList web client with trakt.tv, AniList, Kitsu, SIMKL, Annict and LiveChart integration
https://myani.li
MIT License
15 stars 0 forks source link

[BUG] Removing/Dropping an anime won't POST LiveChart #71

Open nattadasu opened 10 months ago

nattadasu commented 10 months ago

Description

When user wanted to remove a title from their library while connected to LiveChart, the deletion won't POST the request to LiveChart as it seems there's no logic that handles it.

Steps to Reproduce

  1. Pick any title to remove
  2. Open edit menu
  3. Click Remove from list button
  4. Observe network request

Example used

https://myani.li/#/anime/details/36536

Expected Result

A POST request to LiveChart API with following query, taken directly from LiveChart site:

{
    "operationName":"DeleteLibraryEntry",
    "variables": {
        "animeId":"2928"
    },
    "query":"mutation DeleteLibraryEntry($animeId: ID!) {\n  deleteLibraryEntry(animeId: $animeId) {\n    libraryEntry {\n      databaseId\n      __typename\n    }\n    problems {\n      ... on Problem {\n        message\n        path\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}"
}

Actual Result

Looking at network request using DevTools, there's no POST request to LiveChart, only AniList.

image image

Solution

Try to implement the mutation query explained in Expected Result