mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 16:38:23 +00:00
23 lines
530 B
Ruby
23 lines
530 B
Ruby
module Api
|
|
module V1
|
|
class DashboardStatsController < ApplicationController
|
|
include DashboardData
|
|
|
|
before_action :require_session_user!
|
|
|
|
def show
|
|
render json: {
|
|
filterable_dashboard_data: filterable_dashboard_data,
|
|
activity_graph: activity_graph_data,
|
|
today_stats: today_stats_data
|
|
}
|
|
end
|
|
|
|
private
|
|
|
|
def require_session_user!
|
|
render json: { error: "Unauthorized" }, status: :unauthorized unless current_user
|
|
end
|
|
end
|
|
end
|
|
end
|