Fix style points

To make Rubocop and Douwe happy
This commit is contained in:
GitLab 2015-07-28 18:04:57 +02:00
parent 6912f21e5c
commit 16dcf356b5
2 changed files with 7 additions and 8 deletions

View File

@ -180,13 +180,7 @@ module Grack
end
def render_grack_auth_ok
if @user.present?
gl_id = Gitlab::ShellEnv.gl_id(@user)
else
gl_id = ''
end
[200, { "Content-Type" => "application/json" }, [JSON.dump({'GL_ID' => gl_id})]]
[200, { "Content-Type" => "application/json" }, [JSON.dump({ 'GL_ID' => Gitlab::ShellEnv.gl_id(@user) })]]
end
def render_not_found

View File

@ -17,7 +17,12 @@ module Gitlab
end
def gl_id(user)
"user-#{user.id}"
if user.present?
"user-#{user.id}"
else
# This empty string is used in the render_grack_auth_ok method
""
end
end
end
end