diff --git a/api/watchlist/handler.go b/api/watchlist/handler.go index f068fb4..2b420d8 100644 --- a/api/watchlist/handler.go +++ b/api/watchlist/handler.go @@ -172,7 +172,8 @@ func (h *Handler) HandleDeleteWatchlist(w http.ResponseWriter, r *http.Request) return } - if r.URL.Query().Get("from") == "watchlist" { + from := r.URL.Query().Get("from") + if from == "watchlist" { w.WriteHeader(http.StatusOK) return } @@ -183,6 +184,11 @@ func (h *Handler) HandleDeleteWatchlist(w http.ResponseWriter, r *http.Request) airing = anime.Airing.Bool } + if from == "card" { + watchlist.CardButton(int(animeID), anime.TitleOriginal, title, "", anime.ImageUrl, airing, false).Render(r.Context(), w) + return + } + watchlist.WatchlistDropdown(int(animeID), anime.TitleOriginal, title, "", anime.ImageUrl, "", airing).Render(r.Context(), w) } diff --git a/web/components/watchlist/card_button.templ b/web/components/watchlist/card_button.templ index b96afd0..83d41cb 100644 --- a/web/components/watchlist/card_button.templ +++ b/web/components/watchlist/card_button.templ @@ -13,12 +13,15 @@ templ CardButton( ) {