diff --git a/app/controllers/api/v1/registrant/auth_controller.rb b/app/controllers/api/v1/registrant/auth_controller.rb index 30f3ed973..8c72106d0 100644 --- a/app/controllers/api/v1/registrant/auth_controller.rb +++ b/app/controllers/api/v1/registrant/auth_controller.rb @@ -19,8 +19,9 @@ module Api token = create_token(user) if token - ToStdout.msg("Bearer for #{eid_params[:first_name]} #{eid_params[:last_name]} " \ - "(#{eid_params[:ident]}) - '#{token[:access_token]}'") + msg = "Bearer for #{eid_params[:first_name]} #{eid_params[:last_name]} " \ + "(#{eid_params[:ident]}) - '#{token[:access_token]}'" + ToStdout.msg(msg) unless Rails.env.production? render json: token else render json: { errors: [{ base: ['Cannot create generate session token'] }] }