From 3afae05a3eb75f921bcb330ba978daee21050669 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 12 Apr 2020 15:21:11 -0700 Subject: [PATCH] ircd::m::resource: Cleanup the json::tuple-based request template. --- include/ircd/m/resource.h | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/include/ircd/m/resource.h b/include/ircd/m/resource.h index 60f13e23e..5fd441987 100644 --- a/include/ircd/m/resource.h +++ b/include/ircd/m/resource.h @@ -59,17 +59,25 @@ template struct ircd::m::resource::request::object :ircd::resource::request::object { - const m::resource::request &r; - const decltype(r.access_token) &access_token; + const m::resource::request &request; - const decltype(r.node_id) &node_id; - const decltype(r.user_id) &user_id; + const decltype(request.access_token) &access_token + { + request.access_token + }; - object(m::resource::request &r) - :ircd::resource::request::object{r} - ,r{r} - ,access_token{r.access_token} - ,node_id{r.node_id} - ,user_id{r.user_id} + const decltype(request.node_id) &node_id + { + request.node_id + }; + + const decltype(request.user_id) &user_id + { + request.user_id + }; + + object(m::resource::request &request) + :ircd::resource::request::object{request} + ,request{request} {} };