filter_http_methods support handle options

This commit is contained in:
2022-07-08 08:35:32 +00:00
committed by GitHub
parent 8542a68176
commit efb4fc0436
2 changed files with 35 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ impl ResponseJsonFor<Body> for VersionContext {
&self,
req: Request<Body>,
) -> Result<Response<JsonValue>, PixivDownloaderError> {
filter_http_methods!(req, json::object! {}, GET, OPTIONS, POST);
filter_http_methods!(req, json::object! {}, true, GET, OPTIONS, POST);
Ok(Response::new(json::object! {"version": [0, 0, 1, 0]}))
}
}