diff --git a/modules/federation/event.cc b/modules/federation/event.cc index 69be6897c..89d3f0671 100644 --- a/modules/federation/event.cc +++ b/modules/federation/event.cc @@ -10,16 +10,13 @@ using namespace ircd; -mapi::header IRCD_MODULE +mapi::header +IRCD_MODULE { "federation event" }; -struct send -:m::resource -{ - using m::resource::resource; -} +m::resource event_resource { "/_matrix/federation/v1/event/", @@ -29,6 +26,19 @@ event_resource } }; +static m::resource::response +handle_get(client &, + const m::resource::request &); + +m::resource::method +method_get +{ + event_resource, "GET", handle_get, + { + method_get.VERIFY_ORIGIN + } +}; + m::resource::response handle_get(client &client, const m::resource::request &request) @@ -74,12 +84,3 @@ handle_get(client &client, pdus.append(event); return response; } - -m::resource::method -method_get -{ - event_resource, "GET", handle_get, - { - method_get.VERIFY_ORIGIN - } -};