| 882 | // |
| 883 | |
| 884 | static void res_ok(std::unique_ptr<server_http_res> & res, const json & response_data) { |
| 885 | res->status = 200; |
| 886 | res->data = safe_json_to_str(response_data); |
| 887 | } |
| 888 | |
| 889 | static void res_err(std::unique_ptr<server_http_res> & res, const json & error_data) { |
| 890 | res->status = json_value(error_data, "code", 500); |
no test coverage detected