modify conf.
This commit is contained in:
parent
7a5d6916b7
commit
0dafd7be72
|
@ -68,8 +68,14 @@ 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()),
|
||||
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;
|
||||
|
|
|
@ -294,11 +294,7 @@ http {
|
|||
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