modify conf.

This commit is contained in:
luocai 2024-01-05 10:58:11 +08:00
parent 7a5d6916b7
commit 0dafd7be72
2 changed files with 11 additions and 9 deletions

View File

@ -68,9 +68,15 @@ SharedState::SharedState(boost::asio::io_context &ioContext, std::string doc_roo
using namespace boost::beast;
LOG(info) << "add task: " << request.body();
auto database = Amass::Singleton<Database>::instance();
auto root = boost::json::parse(request.body());
bool ret = database->addTask(root.at("createTime").as_int64(), std::string(root.at("content").as_string()),
std::string(root.at("comment").as_string()), root.at("parentId").as_int64());
auto rootJson = boost::json::parse(request.body());
auto &root = rootJson.as_object();
std::string content;
if (root.contains("content")) {
content = root.at("content").as_string();
}
bool ret = database->addTask(root.at("createTime").as_int64(), content,
std::string(root.at("comment").as_string()), root.at("parentId").as_int64());
boost::json::object reply;
reply["status"] = ret ? 0 : -1;
http::response<boost::beast::http::string_body> s{boost::beast::http::status::ok, request.version()};

View File

@ -293,12 +293,8 @@ http {
location /phtot_gallery {
proxy_pass http://local;
}
location = /blog/list {
header_filter_by_lua_block {
ngx.header.content_length = nil
}
body_filter_by_lua_file lua/blog_list.lua; # 过滤掉 隐私文件夹
location ~ /api/v1/.*$ {
proxy_pass http://local;
}