Skip to content

Commit

Permalink
urls: Move the json/fetch_api_key endpoint to be an API-style route.
Browse files Browse the repository at this point in the history
  • Loading branch information
alenavolk authored and showell committed Jan 8, 2018
1 parent 7c22045 commit 9d1063d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion zerver/views/auth.py
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions zproject/legacy_urls.py
Expand Up @@ -16,6 +16,4 @@
# 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),
]
6 changes: 6 additions & 0 deletions zproject/urls.py
Expand Up @@ -517,6 +517,12 @@

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
Expand Down

0 comments on commit 9d1063d

Please sign in to comment.