[FA-misc] Add delete button
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user