Settings: echtes Profil via /api/auth/me (Rolle, Founder, Abo, Avatar)

Login liefert nur {token, name, is_premium}. Für Admin-/Founder-/Tier-Info
holen wir nach Login (und beim Erscheinen von MainTabView) /api/auth/me und
zeigen ein echtes Profil mit Avatar, Email, Rolle und nur dann Premium-Status,
wenn das relevant ist.
This commit is contained in:
rene 2026-05-30 09:37:12 +02:00
parent 81681130e6
commit bfd327bd40
4 changed files with 126 additions and 3 deletions

View file

@ -13,6 +13,22 @@ struct LoginResponse: Decodable {
let isPremium: Bool
}
struct UserProfile: Decodable {
let id: Int
let name: String
let email: String
let realName: String?
let rolle: String?
let isPremium: Bool?
let isFounder: Bool?
let isPartner: Bool?
let founderNumber: Int?
let subscriptionTier: String?
let avatarUrl: String?
let wohnort: String?
let bio: String?
}
// MARK: - Dogs
struct Dog: Decodable, Identifiable {