mirror of
https://github.com/matrix-construct/construct
synced 2024-09-08 01:35:39 +02:00
modules/client/devices: Support /unstable/ URL as well as /r0/.
This commit is contained in:
parent
d960a31143
commit
22fe163344
1 changed files with 37 additions and 0 deletions
|
@ -26,6 +26,16 @@ devices_resource
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ircd::resource
|
||||||
|
devices_resource__unstable
|
||||||
|
{
|
||||||
|
"/_matrix/client/unstable/devices/",
|
||||||
|
{
|
||||||
|
"(11.9) Device Management",
|
||||||
|
resource::DIRECTORY,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static resource::response
|
static resource::response
|
||||||
get__devices_all(client &client,
|
get__devices_all(client &client,
|
||||||
const resource::request &request,
|
const resource::request &request,
|
||||||
|
@ -100,6 +110,15 @@ method_get
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
resource::method
|
||||||
|
method_get__unstable
|
||||||
|
{
|
||||||
|
devices_resource__unstable, "GET", get__devices,
|
||||||
|
{
|
||||||
|
method_get__unstable.REQUIRES_AUTH
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
resource::response
|
resource::response
|
||||||
put__devices(client &client,
|
put__devices(client &client,
|
||||||
const resource::request &request)
|
const resource::request &request)
|
||||||
|
@ -149,6 +168,15 @@ method_put
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
resource::method
|
||||||
|
method_put__unstable
|
||||||
|
{
|
||||||
|
devices_resource__unstable, "PUT", put__devices,
|
||||||
|
{
|
||||||
|
method_put__unstable.REQUIRES_AUTH
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
resource::response
|
resource::response
|
||||||
delete__devices(client &client,
|
delete__devices(client &client,
|
||||||
const resource::request &request)
|
const resource::request &request)
|
||||||
|
@ -191,3 +219,12 @@ method_delete
|
||||||
method_delete.REQUIRES_AUTH
|
method_delete.REQUIRES_AUTH
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
resource::method
|
||||||
|
method_delete__unstable
|
||||||
|
{
|
||||||
|
devices_resource__unstable, "DELETE", delete__devices,
|
||||||
|
{
|
||||||
|
method_delete__unstable.REQUIRES_AUTH
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue