diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-11-21 15:59:37 +0300 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-12-07 17:42:51 +0300 |
commit | 3ed96afc47c481db4f8c0a6581602abaee920808 (patch) | |
tree | 9f840b076417839018586c99d0555fefd4b714cd /lib/api/session.rb | |
parent | 8b379465a5be48c8062379a3dea8e58110c52d87 (diff) |
adds impersonator variable and makes sudo usage overall more clear
Diffstat (limited to 'lib/api/session.rb')
-rw-r--r-- | lib/api/session.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/session.rb b/lib/api/session.rb index d09400b81f5..002ffd1d154 100644 --- a/lib/api/session.rb +++ b/lib/api/session.rb @@ -1,7 +1,7 @@ module API class Session < Grape::API desc 'Login to get token' do - success Entities::UserLogin + success Entities::UserWithPrivateToken end params do optional :login, type: String, desc: 'The username' @@ -14,7 +14,7 @@ module API return unauthorized! unless user return render_api_error!('401 Unauthorized. You have 2FA enabled. Please use a personal access token to access the API', 401) if user.two_factor_enabled? - present user, with: Entities::UserLogin + present user, with: Entities::UserWithPrivateToken end end end |