mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 09:24:57 -04:00
added a dummy (yet) SyncController for testing sync info from iOS
This commit is contained in:
25
YACReaderLibrary/server/controllers/synccontroller.cpp
Normal file
25
YACReaderLibrary/server/controllers/synccontroller.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
#include "synccontroller.h"
|
||||
|
||||
#include "QsLog.h"
|
||||
#include <QUrl>
|
||||
|
||||
SyncController::SyncController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SyncController::service(HttpRequest &request, HttpResponse &response)
|
||||
{
|
||||
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
||||
QStringList pathElements = path.split('/');
|
||||
qulonglong libraryId = pathElements.at(2).toULongLong();
|
||||
|
||||
QString postData = QString::fromUtf8(request.getBody());
|
||||
|
||||
QLOG_INFO() << "POST DATA: " << postData;
|
||||
|
||||
//TODO Process postData and update the comics
|
||||
|
||||
response.write("OK",true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user