2016-10-27 12:38:16 +02:00
|
|
|
from django.conf.urls import url, include
|
2017-03-06 08:35:57 +01:00
|
|
|
from typing import Any
|
|
|
|
|
2016-10-27 15:05:55 +02:00
|
|
|
from zerver.lib.rest import rest_dispatch
|
2017-03-06 08:35:57 +01:00
|
|
|
|
2016-10-27 15:05:55 +02:00
|
|
|
import zilencer.views
|
2016-04-27 06:33:37 +02:00
|
|
|
|
2017-05-31 21:26:30 +02:00
|
|
|
i18n_urlpatterns = [] # type: Any
|
2016-04-27 06:33:37 +02:00
|
|
|
|
|
|
|
# Zilencer views following the REST API style
|
2016-06-24 02:26:09 +02:00
|
|
|
v1_api_and_json_patterns = [
|
2016-10-27 23:55:31 +02:00
|
|
|
url('^remotes/push/register$', rest_dispatch,
|
|
|
|
{'POST': 'zilencer.views.remote_server_register_push'}),
|
|
|
|
url('^remotes/push/unregister$', rest_dispatch,
|
|
|
|
{'POST': 'zilencer.views.remote_server_unregister_push'}),
|
2017-05-08 13:48:16 +02:00
|
|
|
url('^remotes/push/notify$', rest_dispatch,
|
|
|
|
{'POST': 'zilencer.views.remote_server_notify_push'}),
|
2016-06-24 02:26:09 +02:00
|
|
|
]
|
2016-04-27 06:33:37 +02:00
|
|
|
|
2016-06-24 02:26:09 +02:00
|
|
|
urlpatterns = [
|
2016-04-27 06:33:37 +02:00
|
|
|
url(r'^api/v1/', include(v1_api_and_json_patterns)),
|
|
|
|
url(r'^json/', include(v1_api_and_json_patterns)),
|
2017-03-06 08:17:34 +01:00
|
|
|
]
|