Cleaner variable name
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
80036470c3
commit
f8eedb4cda
|
@ -21,12 +21,14 @@ module API
|
||||||
# Example Request:
|
# Example Request:
|
||||||
# GET /projects
|
# GET /projects
|
||||||
get do
|
get do
|
||||||
@query = current_user.authorized_projects
|
@projects = current_user.authorized_projects
|
||||||
|
|
||||||
# If the archived parameter is passed, limit results accordingly
|
# If the archived parameter is passed, limit results accordingly
|
||||||
if params[:archived].present?
|
if params[:archived].present?
|
||||||
@query = @query.where(archived: parse_boolean(params[:archived]))
|
@projects = @projects.where(archived: parse_boolean(params[:archived]))
|
||||||
end
|
end
|
||||||
@projects = paginate @query
|
|
||||||
|
@projects = paginate @projects
|
||||||
present @projects, with: Entities::Project
|
present @projects, with: Entities::Project
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue