urls: Move non-legacy URLs back out of legacy_urls.py.

Only the old API endpoints were actually legacy URLs.
This commit is contained in:
Tim Abbott 2016-06-25 09:30:30 -07:00
parent 982cd5005b
commit 28b6f1d850
2 changed files with 45 additions and 39 deletions

View File

@ -37,43 +37,4 @@ legacy_urls = [
# This json format view is used by the LEGACY pre-REST API. It
# requires an API key.
url(r'^api/v1/send_message$', 'zerver.views.messages.api_send_message'),
# This json format view used by the mobile apps accepts a username
# password/pair and returns an API key.
url(r'^api/v1/fetch_api_key$', 'zerver.views.api_fetch_api_key'),
# This is for the signing in through the devAuthBackEnd on mobile apps.
url(r'^api/v1/dev_fetch_api_key$', 'zerver.views.api_dev_fetch_api_key'),
# This is for fetching the emails of the admins and the users.
url(r'^api/v1/dev_get_emails$', 'zerver.views.api_dev_get_emails'),
# Used to present the GOOGLE_CLIENT_ID to mobile apps
url(r'^api/v1/fetch_google_client_id$', 'zerver.views.api_fetch_google_client_id'),
# Sorted integration-specific webhook callbacks.
url(r'^api/v1/external/airbrake$', 'zerver.views.webhooks.airbrake.api_airbrake_webhook'),
url(r'^api/v1/external/beanstalk$', 'zerver.views.webhooks.beanstalk.api_beanstalk_webhook'),
url(r'^api/v1/external/bitbucket$', 'zerver.views.webhooks.bitbucket.api_bitbucket_webhook'),
url(r'^api/v1/external/circleci$', 'zerver.views.webhooks.circleci.api_circleci_webhook'),
url(r'^api/v1/external/codeship$', 'zerver.views.webhooks.codeship.api_codeship_webhook'),
url(r'^api/v1/external/crashlytics$', 'zerver.views.webhooks.crashlytics.api_crashlytics_webhook'),
url(r'^api/v1/external/desk$', 'zerver.views.webhooks.deskdotcom.api_deskdotcom_webhook'),
url(r'^api/v1/external/freshdesk$', 'zerver.views.webhooks.freshdesk.api_freshdesk_webhook'),
url(r'^api/v1/external/github$', 'zerver.views.webhooks.github.api_github_landing'),
url(r'^api/v1/external/ifttt$', 'zerver.views.webhooks.ifttt.api_iftt_app_webhook'),
url(r'^api/v1/external/jira$', 'zerver.views.webhooks.jira.api_jira_webhook'),
url(r'^api/v1/external/newrelic$', 'zerver.views.webhooks.newrelic.api_newrelic_webhook'),
url(r'^api/v1/external/pagerduty$', 'zerver.views.webhooks.pagerduty.api_pagerduty_webhook'),
url(r'^api/v1/external/pingdom$', 'zerver.views.webhooks.pingdom.api_pingdom_webhook'),
url(r'^api/v1/external/pivotal$', 'zerver.views.webhooks.pivotal.api_pivotal_webhook'),
url(r'^api/v1/external/stash$', 'zerver.views.webhooks.stash.api_stash_webhook'),
url(r'^api/v1/external/taiga$', 'zerver.views.webhooks.taiga.api_taiga_webhook'),
url(r'^api/v1/external/teamcity$', 'zerver.views.webhooks.teamcity.api_teamcity_webhook'),
url(r'^api/v1/external/transifex$', 'zerver.views.webhooks.transifex.api_transifex_webhook'),
url(r'^api/v1/external/travis$', 'zerver.views.webhooks.travis.api_travis_webhook'),
url(r'^api/v1/external/updown$', 'zerver.views.webhooks.updown.api_updown_webhook'),
url(r'^api/v1/external/yo$', 'zerver.views.webhooks.yo.api_yo_app_webhook'),
url(r'^api/v1/external/zendesk$', 'zerver.views.webhooks.zendesk.api_zendesk_webhook'),
url(r'^user_uploads/(?P<realm_id_str>(\d*|unk))/(?P<filename>.*)', 'zerver.views.upload.get_uploaded_file'),
]

View File

@ -61,6 +61,8 @@ i18n_urls = [
# Avatar
url(r'^avatar/(?P<email>[\S]+)?', 'zerver.views.users.avatar'),
# Uploaded files
url(r'^user_uploads/(?P<realm_id_str>(\d*|unk))/(?P<filename>.*)', 'zerver.views.upload.get_uploaded_file'),
# Registration views, require a confirmation ID.
url(r'^accounts/home/', 'zerver.views.accounts_home'),
@ -228,6 +230,49 @@ urls += [
url(r'^json/', include(v1_api_and_json_patterns)),
]
# Incoming webhook URLs
urls += [
# Sorted integration-specific webhook callbacks.
url(r'^api/v1/external/airbrake$', 'zerver.views.webhooks.airbrake.api_airbrake_webhook'),
url(r'^api/v1/external/beanstalk$', 'zerver.views.webhooks.beanstalk.api_beanstalk_webhook'),
url(r'^api/v1/external/bitbucket$', 'zerver.views.webhooks.bitbucket.api_bitbucket_webhook'),
url(r'^api/v1/external/circleci$', 'zerver.views.webhooks.circleci.api_circleci_webhook'),
url(r'^api/v1/external/codeship$', 'zerver.views.webhooks.codeship.api_codeship_webhook'),
url(r'^api/v1/external/crashlytics$', 'zerver.views.webhooks.crashlytics.api_crashlytics_webhook'),
url(r'^api/v1/external/desk$', 'zerver.views.webhooks.deskdotcom.api_deskdotcom_webhook'),
url(r'^api/v1/external/freshdesk$', 'zerver.views.webhooks.freshdesk.api_freshdesk_webhook'),
url(r'^api/v1/external/github$', 'zerver.views.webhooks.github.api_github_landing'),
url(r'^api/v1/external/ifttt$', 'zerver.views.webhooks.ifttt.api_iftt_app_webhook'),
url(r'^api/v1/external/jira$', 'zerver.views.webhooks.jira.api_jira_webhook'),
url(r'^api/v1/external/newrelic$', 'zerver.views.webhooks.newrelic.api_newrelic_webhook'),
url(r'^api/v1/external/pagerduty$', 'zerver.views.webhooks.pagerduty.api_pagerduty_webhook'),
url(r'^api/v1/external/pingdom$', 'zerver.views.webhooks.pingdom.api_pingdom_webhook'),
url(r'^api/v1/external/pivotal$', 'zerver.views.webhooks.pivotal.api_pivotal_webhook'),
url(r'^api/v1/external/stash$', 'zerver.views.webhooks.stash.api_stash_webhook'),
url(r'^api/v1/external/taiga$', 'zerver.views.webhooks.taiga.api_taiga_webhook'),
url(r'^api/v1/external/teamcity$', 'zerver.views.webhooks.teamcity.api_teamcity_webhook'),
url(r'^api/v1/external/transifex$', 'zerver.views.webhooks.transifex.api_transifex_webhook'),
url(r'^api/v1/external/travis$', 'zerver.views.webhooks.travis.api_travis_webhook'),
url(r'^api/v1/external/updown$', 'zerver.views.webhooks.updown.api_updown_webhook'),
url(r'^api/v1/external/yo$', 'zerver.views.webhooks.yo.api_yo_app_webhook'),
url(r'^api/v1/external/zendesk$', 'zerver.views.webhooks.zendesk.api_zendesk_webhook'),
]
# Mobile-specific authentication URLs
urls += [
# This json format view used by the mobile apps accepts a username
# password/pair and returns an API key.
url(r'^api/v1/fetch_api_key$', 'zerver.views.api_fetch_api_key'),
# This is for the signing in through the devAuthBackEnd on mobile apps.
url(r'^api/v1/dev_fetch_api_key$', 'zerver.views.api_dev_fetch_api_key'),
# This is for fetching the emails of the admins and the users.
url(r'^api/v1/dev_get_emails$', 'zerver.views.api_dev_get_emails'),
# Used to present the GOOGLE_CLIENT_ID to mobile apps
url(r'^api/v1/fetch_google_client_id$', 'zerver.views.api_fetch_google_client_id'),
]
# Include URL configuration files for site-specified extra installed
# Django apps
for app_name in settings.EXTRA_INSTALLED_APPS: