mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #6143
6efeefbc
epee: set application/json MIME type on json errors (moneromooo-monero)
This commit is contained in:
commit
8039fd4cab
1 changed files with 2 additions and 0 deletions
|
@ -120,6 +120,7 @@
|
||||||
#define BEGIN_JSON_RPC_MAP(uri) else if(query_info.m_URI == uri) \
|
#define BEGIN_JSON_RPC_MAP(uri) else if(query_info.m_URI == uri) \
|
||||||
{ \
|
{ \
|
||||||
uint64_t ticks = epee::misc_utils::get_tick_count(); \
|
uint64_t ticks = epee::misc_utils::get_tick_count(); \
|
||||||
|
response_info.m_mime_tipe = "application/json"; \
|
||||||
epee::serialization::portable_storage ps; \
|
epee::serialization::portable_storage ps; \
|
||||||
if(!ps.load_from_json(query_info.m_body)) \
|
if(!ps.load_from_json(query_info.m_body)) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -148,6 +149,7 @@
|
||||||
|
|
||||||
#define PREPARE_OBJECTS_FROM_JSON(command_type) \
|
#define PREPARE_OBJECTS_FROM_JSON(command_type) \
|
||||||
handled = true; \
|
handled = true; \
|
||||||
|
response_info.m_mime_tipe = "application/json"; \
|
||||||
boost::value_initialized<epee::json_rpc::request<command_type::request> > req_; \
|
boost::value_initialized<epee::json_rpc::request<command_type::request> > req_; \
|
||||||
epee::json_rpc::request<command_type::request>& req = static_cast<epee::json_rpc::request<command_type::request>&>(req_);\
|
epee::json_rpc::request<command_type::request>& req = static_cast<epee::json_rpc::request<command_type::request>&>(req_);\
|
||||||
if(!req.load(ps)) \
|
if(!req.load(ps)) \
|
||||||
|
|
Loading…
Reference in a new issue