get player id with middleware, not session

This commit is contained in:
2024-02-02 13:03:05 -06:00
parent 438c70b41b
commit ca4823e80b
2 changed files with 7 additions and 18 deletions

View File

@@ -61,7 +61,7 @@ func WithSession(sessions player.RowQuerier) func(http.Handler) http.Handler {
}
}
// Session returns the session ID set by WithSession in the request context.
func Session(ctx context.Context) player.Session {
return value[player.Session](ctx)
// ReqPlayer returns the session ID set by WithSession in the request context.
func ReqPlayer(ctx context.Context) player.ID {
return value[player.ID](ctx)
}