Fixed access issues around new Authorize scheme. (#1416)

This commit is contained in:
Joseph Milazzo 2022-08-08 16:41:14 -05:00 committed by GitHub
parent 9c31f7e7c8
commit 5e273d5d9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 4 deletions

View file

@ -13,6 +13,7 @@ using API.Extensions;
using API.Services;
using API.SignalR;
using Hangfire;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
@ -53,7 +54,6 @@ namespace API.Controllers
[HttpGet("pdf")]
public async Task<ActionResult> GetPdf(int chapterId)
{
var chapter = await _cacheService.Ensure(chapterId);
if (chapter == null) return BadRequest("There was an issue finding pdf file for reading");
@ -84,6 +84,7 @@ namespace API.Controllers
/// <param name="page"></param>
/// <returns></returns>
[HttpGet("image")]
[AllowAnonymous]
public async Task<ActionResult> GetImage(int chapterId, int page)
{
if (page < 0) page = 0;