diff --git a/WebApplication/Restful.cpp b/WebApplication/Restful.cpp index b7a3c29..1ba460a 100644 --- a/WebApplication/Restful.cpp +++ b/WebApplication/Restful.cpp @@ -8,7 +8,7 @@ DBO_INSTANTIATE_TEMPLATES(MyMessage) DbStruct *m_dbStruct; -void JsonResource::handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) { +void AuthenticationResource::handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) { response.setMimeType("application/json"); response.addHeader("Server", "Wt"); diff --git a/WebApplication/Restful.h b/WebApplication/Restful.h index d966c68..ec9b368 100644 --- a/WebApplication/Restful.h +++ b/WebApplication/Restful.h @@ -44,7 +44,7 @@ struct DbStruct { std::uniform_int_distribution distribution; }; -class JsonResource : public Wt::WResource { +class AuthenticationResource : public Wt::WResource { public: void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) final; }; diff --git a/WebApplication/WebApplication.cpp b/WebApplication/WebApplication.cpp index f8f8471..360200f 100644 --- a/WebApplication/WebApplication.cpp +++ b/WebApplication/WebApplication.cpp @@ -30,7 +30,7 @@ WebApplication::WebApplication() { m_server = std::make_unique("./build", args); m_server->addEntryPoint(Wt::EntryPointType::Application, createApplication, "/hello"); m_server->addEntryPoint(Wt::EntryPointType::WidgetSet, createWidgetSet, "/gui/hello.js"); - m_server->addResource(std::make_shared(), "/json"); + m_server->addResource(std::make_shared(), "/auth"); m_server->addResource(std::make_shared(), "/plaintext"); m_server->addResource(std::make_shared("database.sqlite"), "/db");