Commit 7ee732ac authored by Vitali Tatarintev's avatar Vitali Tatarintev

Simplify project_without_auth method

parent a5a2a97a
...@@ -17,12 +17,8 @@ module Projects ...@@ -17,12 +17,8 @@ module Projects
private private
def project_without_auth def project_without_auth
return @project if @project @project ||= Project
.find_by_full_path("#{params[:namespace_id]}/#{params[:project_id]}")
namespace = params[:namespace_id]
id = params[:project_id]
@project = Project.find_by_full_path("#{namespace}/#{id}")
end end
def check_generic_alert_endpoint_feature_flag! def check_generic_alert_endpoint_feature_flag!
......
...@@ -127,12 +127,8 @@ module Projects ...@@ -127,12 +127,8 @@ module Projects
end end
def project_without_auth def project_without_auth
return @project if @project @project ||= Project
.find_by_full_path("#{params[:namespace_id]}/#{params[:project_id]}")
namespace = params[:namespace_id]
id = params[:project_id]
@project = Project.find_by_full_path("#{namespace}/#{id}")
end end
def prometheus_alerts def prometheus_alerts
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment