mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
Fixed TagsController.
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
#include "db_helper.h"
|
#include "db_helper.h"
|
||||||
#include "yacreader_libraries.h"
|
#include "yacreader_libraries.h"
|
||||||
|
|
||||||
#include "reading_list_item.h"
|
#include "reading_list.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
#include "yacreader_global.h"
|
#include "yacreader_global.h"
|
||||||
|
|
||||||
@ -19,11 +19,11 @@ void TagsController::service(HttpRequest& request, HttpResponse& response)
|
|||||||
QStringList pathElements = path.split('/');
|
QStringList pathElements = path.split('/');
|
||||||
int libraryId = pathElements.at(2).toInt();
|
int libraryId = pathElements.at(2).toInt();
|
||||||
|
|
||||||
QList<LabelItem *> tags = DBHelper::getLabelItems(libraryId);
|
QList<Label> tags = DBHelper::getLabels(libraryId);
|
||||||
|
|
||||||
foreach(LabelItem * tag, tags)
|
foreach(const Label &tag, tags)
|
||||||
{
|
{
|
||||||
response.write(QString("%1\t%2\t%3\r\n").arg(tag->getId()).arg(tag->name()).arg(labelColorToRGBString(tag->colorid())).toUtf8());
|
response.write(QString("%1\t%2\t%3\t%4\r\n").arg(libraryId).arg(tag.getId()).arg(tag.getName()).arg(labelColorToRGBString(tag.getColorID())).toUtf8());
|
||||||
}
|
}
|
||||||
|
|
||||||
response.write("",true);
|
response.write("",true);
|
||||||
|
Reference in New Issue
Block a user