summary refs log tree commit diff
path: root/synapse/rest/admin/server_notice_servlet.py
diff options
context:
space:
mode:
authorJorik Schellekens <joriksch@gmail.com>2019-07-24 13:07:35 +0100
committerGitHub <noreply@github.com>2019-07-24 13:07:35 +0100
commitcf2972c818344214244961e6175f559a6b59123b (patch)
treed1a3c4b3a2f2b3e3b1dfcbea88cdf5be75c199ef /synapse/rest/admin/server_notice_servlet.py
parentMake changelog slightly more readable (diff)
downloadsynapse-cf2972c818344214244961e6175f559a6b59123b.tar.xz
Fix servlet metric names (#5734)
* Fix servlet metric names

Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Remove redundant check

* Cover all return paths
Diffstat (limited to 'synapse/rest/admin/server_notice_servlet.py')
-rw-r--r--synapse/rest/admin/server_notice_servlet.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/rest/admin/server_notice_servlet.py b/synapse/rest/admin/server_notice_servlet.py
index ee66838a0d..d9c71261f2 100644
--- a/synapse/rest/admin/server_notice_servlet.py
+++ b/synapse/rest/admin/server_notice_servlet.py
@@ -59,9 +59,14 @@ class SendServerNoticeServlet(RestServlet):
 
     def register(self, json_resource):
         PATTERN = "^/_synapse/admin/v1/send_server_notice"
-        json_resource.register_paths("POST", (re.compile(PATTERN + "$"),), self.on_POST)
         json_resource.register_paths(
-            "PUT", (re.compile(PATTERN + "/(?P<txn_id>[^/]*)$"),), self.on_PUT
+            "POST", (re.compile(PATTERN + "$"),), self.on_POST, self.__class__.__name__
+        )
+        json_resource.register_paths(
+            "PUT",
+            (re.compile(PATTERN + "/(?P<txn_id>[^/]*)$"),),
+            self.on_PUT,
+            self.__class__.__name__,
         )
 
     @defer.inlineCallbacks