Tying something out

This commit is contained in:
kdeng00
2019-08-17 16:04:54 -04:00
parent 533a8d81a9
commit 0fc16daf86
84 changed files with 295 additions and 5694 deletions
+29
View File
@@ -0,0 +1,29 @@
#ifndef LOGINHANDLER_H_
#define LOGINHANDLER_H_
#include <memory>
#include "oatpp/network/server/Server.hpp"
#include "oatpp/network/server/SimpleTCPConnectionProvider.hpp"
#include "oatpp/web/server/HttpConnectionHandler.hpp"
#include "dto/loginResultDto.hpp"
//#include "dto/loginResultDto.hpp"
class loginHandler : public oatpp::web::server::HttpRequestHandler
{
public:
std::shared_ptr<OutgoingResponse> handle(const std::shared_ptr<IncomingRequest>& request) override
{
auto logRes = loginResultDto::createShared();
logRes->access_token = "hahahahahahaha";
logRes->token_type = "Fly";
return ResponseFactory::createResponse(Status::CODE_200, "ddd");
}
private:
OATPP_COMPONENT(std::shared_ptr<oatpp::data::mapping::ObjectMapper>, m_objectMapper);
};
#endif