Patrick Cloke
9dc3293e0b
Consolidate the logic of delete_device/delete_devices. ( #12970 )
...
By always using delete_devices and sometimes passing a list
with a single device ID.
Previously these methods had gotten out of sync with each
other and it seems there's little benefit to the single-device
variant.
2022-06-07 07:43:35 -04:00
Richard van der Hoff
e24ff8ebe3
Remove HomeServer.get_datastore()
( #12031 )
...
The presence of this method was confusing, and mostly present for backwards
compatibility. Let's get rid of it.
Part of #11733
2022-02-23 11:04:02 +00:00
reivilibre
e5cdb9e233
Make get_device
return None if the device doesn't exist rather than raising an exception. ( #11565 )
...
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2021-12-13 15:39:43 +00:00
Dirk Klimpel
7ecaa3b976
Clean up synapse.rest.admin
( #11535 )
2021-12-08 16:59:40 +00:00
Dirk Klimpel
e8ae94a223
Convert status codes to HTTPStatus
in synapse.rest.admin
( #11452 )
2021-11-29 22:19:45 +00:00
Sean Quah
2b82ec425f
Add type hints for most HomeServer
parameters ( #11095 )
2021-10-22 18:15:41 +01:00
Patrick Cloke
b93259082c
Add missing type hints to non-client REST servlets. ( #10817 )
...
Including admin, consent, key, synapse, and media. All REST servlets
(the synapse.rest module) now require typed method definitions.
2021-09-15 08:45:32 -04:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
...
Part of #9744
Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
2021-04-14 15:34:27 +01:00
Dirk Klimpel
f00c4e7af0
Add type hints to device and event report admin API ( #9519 )
2021-03-02 09:31:12 +00:00
Dirk Klimpel
913f8a06e4
Add field total
to device list in admin API ( #8644 )
2020-10-26 14:07:51 +00:00
Patrick Cloke
8a4a4186de
Simplify super() calls to Python 3 syntax. ( #8344 )
...
This converts calls like super(Foo, self) -> super().
Generated with:
sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
2020-09-18 09:56:44 -04:00
Patrick Cloke
c3c9732c53
Use admin_patterns for all admin APIs. ( #8331 )
...
This reduces duplication of the admin prefix in regular expressions.
2020-09-17 07:04:15 -04:00
Dirk Klimpel
2970ce8367
Add device management to admin API ( #7481 )
...
- Admin is able to
- change displaynames
- delete devices
- list devices
- get device informations
Fixes #7330
2020-06-05 13:07:22 +01:00