More fixes (again) (#858)

* Send stack trace to the UI on prod mode

* Pdfs will now generate cover images. I missed something a few releases ago.
This commit is contained in:
Joseph Milazzo 2021-12-17 16:29:41 -06:00 committed by GitHub
parent c284e4dca0
commit d4918ee8ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -37,7 +37,7 @@ namespace API.Middleware
var response = _env.IsDevelopment()
? new ApiException(context.Response.StatusCode, ex.Message, ex.StackTrace)
: new ApiException(context.Response.StatusCode, "Internal Server Error");
: new ApiException(context.Response.StatusCode, "Internal Server Error", ex.StackTrace);
var options = new JsonSerializerOptions
{

View File

@ -86,6 +86,7 @@ public class ReadingItemService : IReadingItemService
MangaFormat.Epub => _bookService.GetCoverImage(filePath, fileName),
MangaFormat.Archive => _archiveService.GetCoverImage(filePath, fileName),
MangaFormat.Image => _imageService.GetCoverImage(filePath, fileName),
MangaFormat.Pdf => _bookService.GetCoverImage(filePath, fileName),
_ => string.Empty
};
}