[FA-misc] Delete novel now authorizes based on group
All checks were successful
CI / build-backend (pull_request) Successful in 1m46s
CI / build-frontend (pull_request) Successful in 44s

This commit is contained in:
gamer147
2026-02-01 19:05:18 -05:00
parent ece85cff7c
commit 5e48f5737f
4 changed files with 19 additions and 14 deletions

View File

@@ -5,6 +5,7 @@ using FictionArchive.Service.NovelService.Models.Novels;
using FictionArchive.Service.NovelService.Models.SourceAdapters;
using FictionArchive.Service.NovelService.Services;
using FictionArchive.Service.NovelService.Services.SourceAdapters;
using FictionArchive.Service.Shared.Constants;
using FictionArchive.Service.Shared.Contracts.Events;
using HotChocolate.Authorization;
using HotChocolate.Types;
@@ -21,19 +22,8 @@ public class Mutation
return await service.QueueNovelImport(novelUrl);
}
[Authorize]
public async Task<ChapterPullRequested> FetchChapterContents(
Guid importId,
uint novelId,
uint volumeId,
uint chapterOrder,
NovelUpdateService service)
{
return await service.QueueChapterPull(importId, novelId, volumeId, chapterOrder);
}
[Error<KeyNotFoundException>]
[Authorize]
[Authorize(Roles = [AuthorizationConstants.Roles.Admin])]
public async Task<bool> DeleteNovel(uint novelId, NovelUpdateService service)
{
await service.DeleteNovel(novelId);