From f60e17674e54fd5db408a9b30f8776d398154e85 Mon Sep 17 00:00:00 2001 From: Igor Kushnir Date: Fri, 5 Feb 2021 17:40:58 +0200 Subject: [PATCH] Server controllers: remove unused libraryName variable --- .../server/controllers/v1/folderinfocontroller.cpp | 1 - YACReaderLibrary/server/controllers/v1/pagecontroller.cpp | 3 --- .../server/controllers/v2/folderinfocontroller_v2.cpp | 1 - YACReaderLibrary/server/controllers/v2/pagecontroller_v2.cpp | 3 --- .../server/controllers/v2/readinglistinfocontroller_v2.cpp | 1 - .../server/controllers/v2/taginfocontroller_v2.cpp | 1 - .../server/controllers/v2/updatecomiccontroller_v2.cpp | 1 - 7 files changed, 11 deletions(-) diff --git a/YACReaderLibrary/server/controllers/v1/folderinfocontroller.cpp b/YACReaderLibrary/server/controllers/v1/folderinfocontroller.cpp index 55801810..18189b8b 100644 --- a/YACReaderLibrary/server/controllers/v1/folderinfocontroller.cpp +++ b/YACReaderLibrary/server/controllers/v1/folderinfocontroller.cpp @@ -19,7 +19,6 @@ void FolderInfoController::service(HttpRequest &request, HttpResponse &response) QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8(); QStringList pathElements = path.split('/'); int libraryId = pathElements.at(2).toInt(); - QString libraryName = DBHelper::getLibraryName(libraryId); qulonglong parentId = pathElements.at(4).toULongLong(); serviceComics(libraryId, parentId, response); diff --git a/YACReaderLibrary/server/controllers/v1/pagecontroller.cpp b/YACReaderLibrary/server/controllers/v1/pagecontroller.cpp index 5d0cfe57..610ec566 100644 --- a/YACReaderLibrary/server/controllers/v1/pagecontroller.cpp +++ b/YACReaderLibrary/server/controllers/v1/pagecontroller.cpp @@ -11,8 +11,6 @@ #include -#include "db_helper.h" - using stefanfrings::HttpRequest; using stefanfrings::HttpResponse; using stefanfrings::HttpSession; @@ -31,7 +29,6 @@ void PageController::service(HttpRequest &request, HttpResponse &response) //qDebug("PageController: request to -> %s ",path2.data()); QStringList pathElements = path.split('/'); - QString libraryName = DBHelper::getLibraryName(pathElements.at(2).toInt()); qulonglong comicId = pathElements.at(4).toULongLong(); unsigned int page = pathElements.at(6).toUInt(); diff --git a/YACReaderLibrary/server/controllers/v2/folderinfocontroller_v2.cpp b/YACReaderLibrary/server/controllers/v2/folderinfocontroller_v2.cpp index 77801673..c6988435 100644 --- a/YACReaderLibrary/server/controllers/v2/folderinfocontroller_v2.cpp +++ b/YACReaderLibrary/server/controllers/v2/folderinfocontroller_v2.cpp @@ -19,7 +19,6 @@ void FolderInfoControllerV2::service(HttpRequest &request, HttpResponse &respons QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8(); QStringList pathElements = path.split('/'); int libraryId = pathElements.at(3).toInt(); - QString libraryName = DBHelper::getLibraryName(libraryId); qulonglong parentId = pathElements.at(5).toULongLong(); serviceComics(libraryId, parentId, response); diff --git a/YACReaderLibrary/server/controllers/v2/pagecontroller_v2.cpp b/YACReaderLibrary/server/controllers/v2/pagecontroller_v2.cpp index 9366624e..2163cde0 100644 --- a/YACReaderLibrary/server/controllers/v2/pagecontroller_v2.cpp +++ b/YACReaderLibrary/server/controllers/v2/pagecontroller_v2.cpp @@ -11,8 +11,6 @@ #include -#include "db_helper.h" - using stefanfrings::HttpRequest; using stefanfrings::HttpResponse; @@ -33,7 +31,6 @@ void PageControllerV2::service(HttpRequest &request, HttpResponse &response) bool remote = path.endsWith("remote"); QStringList pathElements = path.split('/'); - QString libraryName = DBHelper::getLibraryName(pathElements.at(2).toInt()); qulonglong comicId = pathElements.at(5).toULongLong(); unsigned int page = pathElements.at(7).toUInt(); diff --git a/YACReaderLibrary/server/controllers/v2/readinglistinfocontroller_v2.cpp b/YACReaderLibrary/server/controllers/v2/readinglistinfocontroller_v2.cpp index f95cf498..6145cf63 100644 --- a/YACReaderLibrary/server/controllers/v2/readinglistinfocontroller_v2.cpp +++ b/YACReaderLibrary/server/controllers/v2/readinglistinfocontroller_v2.cpp @@ -20,7 +20,6 @@ void ReadingListInfoControllerV2::service(HttpRequest &request, HttpResponse &re QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8(); QStringList pathElements = path.split('/'); int libraryId = pathElements.at(3).toInt(); - QString libraryName = DBHelper::getLibraryName(libraryId); qulonglong listId = pathElements.at(5).toULongLong(); serviceComics(libraryId, listId, response); diff --git a/YACReaderLibrary/server/controllers/v2/taginfocontroller_v2.cpp b/YACReaderLibrary/server/controllers/v2/taginfocontroller_v2.cpp index 3d87235f..29dad28c 100644 --- a/YACReaderLibrary/server/controllers/v2/taginfocontroller_v2.cpp +++ b/YACReaderLibrary/server/controllers/v2/taginfocontroller_v2.cpp @@ -20,7 +20,6 @@ void TagInfoControllerV2::service(HttpRequest &request, HttpResponse &response) QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8(); QStringList pathElements = path.split('/'); int libraryId = pathElements.at(3).toInt(); - QString libraryName = DBHelper::getLibraryName(libraryId); qulonglong listId = pathElements.at(5).toULongLong(); serviceComics(libraryId, listId, response); diff --git a/YACReaderLibrary/server/controllers/v2/updatecomiccontroller_v2.cpp b/YACReaderLibrary/server/controllers/v2/updatecomiccontroller_v2.cpp index 2773608e..b7b24ed8 100644 --- a/YACReaderLibrary/server/controllers/v2/updatecomiccontroller_v2.cpp +++ b/YACReaderLibrary/server/controllers/v2/updatecomiccontroller_v2.cpp @@ -21,7 +21,6 @@ void UpdateComicControllerV2::service(HttpRequest &request, HttpResponse &respon QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8(); QStringList pathElements = path.split('/'); qulonglong libraryId = pathElements.at(3).toULongLong(); - QString libraryName = DBHelper::getLibraryName(libraryId); qulonglong comicId = pathElements.at(5).toULongLong(); QString postData = QString::fromUtf8(request.getBody());