mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
show logged-in player count in landing hero
Count distinct users with a session token valid within the 14-day window and use it for the hero players-training stat. The learning strip keeps the total player count. Also load the split seed modules in seeds_test and drop an invalid 8-piece seed FEN so precommit passes.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
defmodule ChesstrainerWeb.PageController do
|
||||
use ChesstrainerWeb, :controller
|
||||
|
||||
alias Chesstrainer.Accounts
|
||||
alias Chesstrainer.Attempts
|
||||
alias Chesstrainer.Branding
|
||||
alias Chesstrainer.DailyPuzzles
|
||||
@@ -23,6 +24,7 @@ defmodule ChesstrainerWeb.PageController do
|
||||
active_endgame: DailyPuzzles.today(),
|
||||
puzzle_count: Endgames.count_endgames(),
|
||||
user_count: Attempts.count_users_with_attempts(),
|
||||
logged_in_count: Accounts.count_logged_in_users(),
|
||||
today: Date.utc_today()
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user