[FA-misc] Add delete button
Some checks failed
CI / build-backend (pull_request) Successful in 2m35s
CI / build-frontend (pull_request) Failing after 27s

This commit is contained in:
gamer147
2025-12-11 15:00:55 -05:00
parent bbc0b5ec7d
commit 02525d611a
5 changed files with 199 additions and 8 deletions

View File

@@ -7,6 +7,7 @@ using FictionArchive.Service.NovelService.Services;
using FictionArchive.Service.NovelService.Services.SourceAdapters;
using FictionArchive.Service.Shared.Services.EventBus;
using HotChocolate.Authorization;
using HotChocolate.Types;
using Microsoft.EntityFrameworkCore;
namespace FictionArchive.Service.NovelService.GraphQL;
@@ -26,4 +27,12 @@ public class Mutation
{
return await service.QueueChapterPull(novelId, chapterNumber);
}
[Error<KeyNotFoundException>]
[Authorize]
public async Task<bool> DeleteNovel(uint novelId, NovelUpdateService service)
{
await service.DeleteNovel(novelId);
return true;
}
}