mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 21:05:15 +00:00
fix: use @user.heartbeats to only filter heartbeats by user
This commit is contained in:
parent
725048c864
commit
91a0daf23f
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ class Api::V1::StatsController < ApplicationController
|
|||
scope = nil
|
||||
if params[:filter_by_project].present?
|
||||
filter_by_project = params[:filter_by_project].split(",")
|
||||
scope = Heartbeat.where(project: filter_by_project)
|
||||
scope = @user.heartbeats.where(project: filter_by_project)
|
||||
end
|
||||
|
||||
limit = params[:limit].to_i
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue