Persons: other people's charts with package slots, list page, switcher
- charts.kind own/person; a new person uses a 'person' unit (not refunded on delete); person packages and an unlimited entitlement; admins unlimited - a person's birth data can be corrected within an hour (admins any time) - /kepletek list with tiles, /kepletek/uj, correction page, mock person packages, chart page title switches between charts keeping the tab Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -31,12 +31,14 @@ pub async fn me(State(state): St, auth: AuthUser) -> ApiResult<Json<Value>> {
|
||||
let mut conn = state.db.acquire().await?;
|
||||
let balance = credits::balance(&mut conn, auth.id()).await?;
|
||||
let birth_change = crate::birth_changes::view(&mut conn, &auth).await?;
|
||||
let persons = crate::persons::slots(&mut conn, &auth, state.config.free_person_slots).await?;
|
||||
Ok(Json(json!({
|
||||
"user": UserView::from(&auth.user),
|
||||
"providers": providers.into_iter().map(|(p,)| p).collect::<Vec<_>>(),
|
||||
"primary_chart_id": primary.map(|(id,)| id),
|
||||
"analyses_left": balance.view(),
|
||||
"birth_change": birth_change,
|
||||
"persons": persons.view(),
|
||||
})))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user