Skip to content

Commit

Permalink
Reorder handlers to reduce diff between apps
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-ucsc committed Nov 14, 2024
1 parent 4a1ae7e commit f988dc3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lambdas/service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,18 +482,6 @@ def static_resource(file):
return app.swagger_resource(file)


@app.route(
'/oauth2_redirect',
enabled=config.google_oauth2_client_id is not None,
cache_control='no-store'
)
def oauth2_redirect():
oauth2_redirect_html = app.load_static_resource('swagger', 'oauth2-redirect.html')
return Response(status_code=200,
headers={"Content-Type": "text/html"},
body=oauth2_redirect_html)


common_specs = CommonEndpointSpecs(app_name='service')


Expand Down Expand Up @@ -591,6 +579,18 @@ def update_health_cache(_event: chalice.app.CloudWatchEvent):
app.health_controller.update_cache()


@app.route(
'/oauth2_redirect',
enabled=config.google_oauth2_client_id is not None,
cache_control='no-store'
)
def oauth2_redirect():
oauth2_redirect_html = app.load_static_resource('swagger', 'oauth2-redirect.html')
return Response(status_code=200,
headers={"Content-Type": "text/html"},
body=oauth2_redirect_html)


def validate_repository_search(entity_type: EntityType,
params: Mapping[str, str],
**validators):
Expand Down

0 comments on commit f988dc3

Please sign in to comment.