summary refs log tree commit diff
path: root/synapse/http/servlet.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-12-01 17:34:32 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2015-12-01 17:34:32 +0000
commit14d7acfad48ea7807b032b3fd99649b500e651f7 (patch)
treef92b2d24bd243c3d91c0ca998f67fc5c7d2b95a3 /synapse/http/servlet.py
parentMerge pull request #404 from matrix-org/markjh/trivial_rename (diff)
downloadsynapse-14d7acfad48ea7807b032b3fd99649b500e651f7.tar.xz
Host /unstable and /r0 versions of r0 APIs
Diffstat (limited to 'synapse/http/servlet.py')
-rw-r--r--synapse/http/servlet.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py
index 9cda17fcf8..32b6d6cd72 100644
--- a/synapse/http/servlet.py
+++ b/synapse/http/servlet.py
@@ -19,7 +19,6 @@ from synapse.api.errors import SynapseError
 
 import logging
 
-
 logger = logging.getLogger(__name__)
 
 
@@ -102,12 +101,13 @@ class RestServlet(object):
 
     def register(self, http_server):
         """ Register this servlet with the given HTTP server. """
-        if hasattr(self, "PATTERN"):
-            pattern = self.PATTERN
+        if hasattr(self, "PATTERNS"):
+            patterns = self.PATTERNS
 
             for method in ("GET", "PUT", "POST", "OPTIONS", "DELETE"):
                 if hasattr(self, "on_%s" % (method,)):
                     method_handler = getattr(self, "on_%s" % (method,))
-                    http_server.register_path(method, pattern, method_handler)
+                    http_server.register_paths(method, patterns, method_handler)
+
         else:
             raise NotImplementedError("RestServlet must register something.")