Skip to content

Commit b1f5c5c

Browse files
committed
Require explicit format for explore requests.
1 parent a0e7f00 commit b1f5c5c

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/parse/query.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,17 @@ bool parse_query(rpc::request_t& out, const request& request) NOEXCEPT
8787
return true;
8888
}
8989

90-
////if (contains(accepts, json) || format == "json")
91-
////{
92-
//// params["media"] = to_value(json);
93-
//// return true;
94-
////}
95-
96-
// Default to json.
97-
params["media"] = to_value(json);
98-
return true;
90+
////// Default format to json.
91+
////params["media"] = to_value(json);
92+
////return true;
93+
94+
if (contains(accepts, json) || format == "json")
95+
{
96+
params["media"] = to_value(json);
97+
return true;
98+
}
99+
100+
return false;
99101
}
100102

101103
BC_POP_WARNING()

0 commit comments

Comments
 (0)