Class: Api::V1::StatsController

Inherits:
ApiController
  • Object
show all
Defined in:
app/controllers/api/v1/stats_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/api/v1/stats_controller.rb', line 3

def index
  if params[:project_token]
    project = Project.find_by_api_access_token(params[:project_token])
    if project
      @project_id = project.id
    else
      render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found
    end
  end
end