| 751 | // |
| 752 | |
| 753 | static void res_ok(std::unique_ptr<server_http_res> & res, const json & response_data) { |
| 754 | res->status = 200; |
| 755 | res->data = safe_json_to_str(response_data); |
| 756 | } |
| 757 | |
| 758 | static void res_err(std::unique_ptr<server_http_res> & res, const json & error_data) { |
| 759 | res->status = json_value(error_data, "code", 500); |
no test coverage detected