fix db in exception

This commit is contained in:
chatlanin 2024-07-09 10:08:58 +03:00
parent c26089afd6
commit 77ba48efca

View File

@ -16,8 +16,6 @@ namespace hack
{ {
using JSON = nlohmann::json; using JSON = nlohmann::json;
const std::string SET_LOG = "set_log";
class exception : public utils::json_converter<JSON> class exception : public utils::json_converter<JSON>
{ {
public: public:
@ -52,8 +50,7 @@ namespace hack
template<typename Database> template<typename Database>
void commit(const std::filesystem::path file_name = DEF_FILE_NAME(), std::string line = DEF_LINE()) void commit(const std::filesystem::path file_name = DEF_FILE_NAME(), std::string line = DEF_LINE())
{ {
auto r = Database::instance().execute(SET_LOG, convert_to_json()); Database::instance().execute("logger", convert_to_json());
error()(r);
} }
template<typename HttpResponse> template<typename HttpResponse>