From: Tom Clegg Date: Thu, 20 Jun 2013 15:16:46 +0000 (-0400) Subject: avoid sending html redirect to api client X-Git-Tag: 1.1.0~3192 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/dfb2cea77b806a8d3b50f367288207373e9f543f avoid sending html redirect to api client --- diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index 33f92ecbe4..0335bed9fb 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -209,12 +209,12 @@ class ApplicationController < ActionController::Base def login_required if !current_user respond_to do |format| - format.html { - redirect_to '/auth/joshid' - } format.json { render :json => { errors: ['Not logged in'] }.to_json, status: 401 } + format.html { + redirect_to '/auth/joshid' + } end end end