mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
added new web controller for knowing the version of the web api
This commit is contained in:
10
YACReaderLibrary/server/controllers/versioncontroller.cpp
Normal file
10
YACReaderLibrary/server/controllers/versioncontroller.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include "versioncontroller.h"
|
||||
|
||||
VersionController::VersionController() {}
|
||||
|
||||
void VersionController::service(HttpRequest& request, HttpResponse& response)
|
||||
{
|
||||
Q_UNUSED(request);
|
||||
|
||||
response.writeText(SERVER_VERSION_NUMBER,true);
|
||||
}
|
21
YACReaderLibrary/server/controllers/versioncontroller.h
Normal file
21
YACReaderLibrary/server/controllers/versioncontroller.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef VERSIONCONTROLLER_H
|
||||
#define VERSIONCONTROLLER_H
|
||||
|
||||
#include "httprequest.h"
|
||||
#include "httpresponse.h"
|
||||
#include "httprequesthandler.h"
|
||||
|
||||
#include <QThread>
|
||||
|
||||
class VersionController : public HttpRequestHandler {
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(VersionController);
|
||||
public:
|
||||
/** Constructor */
|
||||
VersionController();
|
||||
|
||||
/** Generates the response */
|
||||
void service(HttpRequest& request, HttpResponse& response);
|
||||
};
|
||||
|
||||
#endif // VERSIONCONTROLLER_H
|
Reference in New Issue
Block a user