diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/GetEssen.hpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/GetEssen.hpp b/include/GetEssen.hpp index 06aafe2..adbd003 100644 --- a/include/GetEssen.hpp +++ b/include/GetEssen.hpp @@ -12,6 +12,8 @@ #include "Handler.hpp" #include "Response.hpp" +#include "sqdb.hpp" +#include "Utilities.hpp" namespace Handler { namespace MensaHandler { @@ -20,7 +22,7 @@ namespace Handler { struct MensaEssen { int ID{191}; - std::queue<crow::json::wvalue> Message; + std::string Message; ptime Datum; ptime LastModified; }; @@ -30,19 +32,19 @@ namespace Handler { }; - bool db_update_mensa_message(const int &mensaID, const ptime &mensaDatum, const std::vector<crow::json::wvalue> &message); + bool db_update_mensa_message(const int &mensaID, const ptime &mensaDatum, const std::string &message); bool db_insert_mensa_message(const int &mensaID, const ptime &mensaDatum, const string &message); MensaEssen db_get_mensa_message(const int &mensaID, const ptime &mensaDatum); - std::vector<crow::json::wvalue> getEssenOnline(int mensa_ID, boost::posix_time::ptime datumEssen); + //std::vector<crow::json::wvalue> getEssenOnline(int mensa_ID, boost::posix_time::ptime datumEssen); - std::vector<crow::json::wvalue> getEssen(int mensa_ID, int offset); + std::string getEssen(int mensa_ID, int offset); - std::vector<crow::json::wvalue> parseEssen(MensaEssen Essen); + //std::vector<crow::json::wvalue> parseEssen(MensaEssen Essen); - std::vector<crow::json::wvalue> read_mensa_message_from_file(const int &mensa_id_file); + std::string read_mensa_message_from_file(const int &mensa_id_file); } json mensaHandler(std::string const &arguments, std::string const &session, void *payload); |