diff --git a/src/store.cpp b/src/store.cpp index fcfcfcf..e90ba03 100644 --- a/src/store.cpp +++ b/src/store.cpp @@ -63,26 +63,10 @@ int Application::run() { }; http_server.default_resource["POST"] = - [&](std::shared_ptr response, - std::shared_ptr request) { - if (https_server) { - return response::https_required(response); - } - - json data; - try { - request->content >> data; - } catch (...) { - return response::bad_json(response); - } - if (data.is_object()) { - store.update(data); - return response->write(Status::success_no_content); - } - return response->write(Status::client_error_bad_request); + [&](std::shared_ptr response, ...) { + return response::not_found(response); }; - servers.emplace_back([&]() { http_server.start(web_server_started); }); for (auto &server : servers) {