mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
Return 404 if the comic is not found
This commit is contained in:
@ -22,6 +22,12 @@ void ComicDownloadInfoControllerV2::service(HttpRequest &request, HttpResponse &
|
||||
|
||||
ComicDB comic = DBHelper::getComicInfo(libraryId, comicId);
|
||||
|
||||
if (!comic.info.existOnDb) {
|
||||
response.setStatus(404, "Not Found");
|
||||
response.write("", true);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: check if the comic wasn't found;
|
||||
response.write(QString("fileName:%1\r\n").arg(comic.getFileName()).toUtf8());
|
||||
response.write(QString("fileSize:%1\r\n").arg(comic.getFileSize()).toUtf8());
|
||||
|
Reference in New Issue
Block a user