mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Return 404 if the comic is not found
This commit is contained in:
@ -57,6 +57,12 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
|
||||
ComicDB comic = DBHelper::getComicInfo(libraryId, comicId);
|
||||
|
||||
if (!comic.info.existOnDb) {
|
||||
response.setStatus(404, "Not Found");
|
||||
response.write("", true);
|
||||
return;
|
||||
}
|
||||
|
||||
Comic *comicFile = FactoryComic::newComic(libraries.getPath(libraryId) + comic.path);
|
||||
|
||||
if (comicFile != nullptr) {
|
||||
|
Reference in New Issue
Block a user