Added deletion to Kitsu imports
This commit is contained in:
@ -23,6 +23,10 @@ export function newAnimeDiffIgnore(arn: AnimeNotifier, button: HTMLButtonElement
|
||||
|
||||
// Import Kitsu anime
|
||||
export async function importKitsuAnime(arn: AnimeNotifier, button: HTMLButtonElement) {
|
||||
if(!confirm("Are you sure you want to import this anime?")) {
|
||||
return
|
||||
}
|
||||
|
||||
let newTab = window.open()
|
||||
let animeId = button.dataset.id
|
||||
let response = await fetch(`/api/import/kitsu/anime/${animeId}`, {
|
||||
@ -38,6 +42,17 @@ export async function importKitsuAnime(arn: AnimeNotifier, button: HTMLButtonEle
|
||||
}
|
||||
}
|
||||
|
||||
// Delete Kitsu anime
|
||||
export async function deleteKitsuAnime(arn: AnimeNotifier, button: HTMLButtonElement) {
|
||||
if(!confirm("Are you sure you want to delete this anime?")) {
|
||||
return
|
||||
}
|
||||
|
||||
let animeId = button.dataset.id
|
||||
await arn.post(`/api/delete/kitsu/anime/${animeId}`)
|
||||
arn.reloadContent()
|
||||
}
|
||||
|
||||
// Multi-search anime
|
||||
export async function multiSearchAnime(arn: AnimeNotifier, textarea: HTMLTextAreaElement) {
|
||||
let results = document.getElementById("multi-search-anime") as HTMLDivElement
|
||||
|
Reference in New Issue
Block a user