modify conf.
This commit is contained in:
parent
7a5d6916b7
commit
0dafd7be72
@ -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()};
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user