mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
urls: Move the json/fetch_api_key endpoint to be an API-style route.
This commit is contained in:
@@ -731,7 +731,6 @@ def api_get_server_settings(request: HttpRequest) -> HttpResponse:
|
||||
result[settings_item] = context[settings_item]
|
||||
return json_success(result)
|
||||
|
||||
@authenticated_json_post_view
|
||||
@has_request_variables
|
||||
def json_fetch_api_key(request: HttpRequest, user_profile: UserProfile,
|
||||
password: str=REQ(default='')) -> HttpResponse:
|
||||
|
@@ -16,6 +16,4 @@ legacy_urls = [
|
||||
# any more to find out about subscriptions, since they are already
|
||||
# pushed to us via the event system.
|
||||
url(r'^json/subscriptions/exists$', zerver.views.streams.json_stream_exists),
|
||||
|
||||
url(r'^json/fetch_api_key$', zerver.views.auth.json_fetch_api_key),
|
||||
]
|
||||
|
@@ -517,6 +517,12 @@ for incoming_webhook in WEBHOOK_INTEGRATIONS:
|
||||
|
||||
urls.append(url(r'^api/v1/external/github', github_dispatcher.api_github_webhook_dispatch))
|
||||
|
||||
# Desktop-specific authentication URLs
|
||||
urls += [
|
||||
url(r'^json/fetch_api_key$', rest_dispatch,
|
||||
{'POST': 'zerver.views.auth.json_fetch_api_key'}),
|
||||
]
|
||||
|
||||
# Mobile-specific authentication URLs
|
||||
urls += [
|
||||
# This json format view used by the mobile apps lists which
|
||||
|
Reference in New Issue
Block a user