mirror of
https://github.com/YACReader/yacreader
synced 2025-07-17 20:44:32 -04:00
Fix label content controller v2
This commit is contained in:
@ -28,10 +28,16 @@ void TagContentControllerV2::service(HttpRequest &request, HttpResponse &respons
|
|||||||
|
|
||||||
void TagContentControllerV2::serviceContent(const int &library, const qulonglong &tagId, HttpResponse &response)
|
void TagContentControllerV2::serviceContent(const int &library, const qulonglong &tagId, HttpResponse &response)
|
||||||
{
|
{
|
||||||
QList<ComicDB> tagComics = DBHelper::getLabelComics(library, tagId);
|
QList<ComicDB> comics = DBHelper::getLabelComics(library, tagId);
|
||||||
|
|
||||||
for(const ComicDB &comic : tagComics)
|
QJsonArray items;
|
||||||
|
|
||||||
|
for(const ComicDB &comic : comics)
|
||||||
{
|
{
|
||||||
response.write(YACReaderServerDataHelper::comicToYSFormat(library, comic).toUtf8());
|
items.append(YACReaderServerDataHelper::comicToJSON(library, comic));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QJsonDocument output(items);
|
||||||
|
|
||||||
|
response.write(output.toJson(QJsonDocument::Compact));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user