Release v1.1.3
This commit is contained in:
commit
b3e81f4504
6 changed files with 18 additions and 7 deletions
|
|
@ -197,7 +197,8 @@ async def me(user=Depends(get_current_user)):
|
||||||
row = conn.execute(
|
row = conn.execute(
|
||||||
"""SELECT id, name, real_name, email, rolle, is_premium, email_verified,
|
"""SELECT id, name, real_name, email, rolle, is_premium, email_verified,
|
||||||
bio, wohnort, erfahrung, social_link,
|
bio, wohnort, erfahrung, social_link,
|
||||||
profil_sichtbarkeit, avatar_url, created_at
|
profil_sichtbarkeit, avatar_url, created_at,
|
||||||
|
is_founder, is_partner, founder_number
|
||||||
FROM users WHERE id=?""",
|
FROM users WHERE id=?""",
|
||||||
(user["id"],)
|
(user["id"],)
|
||||||
).fetchone()
|
).fetchone()
|
||||||
|
|
|
||||||
|
|
@ -92,14 +92,17 @@ def grant_user_status(user_id: int, data: GrantRequest, user=Depends(require_adm
|
||||||
).fetchone()
|
).fetchone()
|
||||||
if not target:
|
if not target:
|
||||||
raise HTTPException(404, "User nicht gefunden.")
|
raise HTTPException(404, "User nicht gefunden.")
|
||||||
# Beim manuellen Vergeben von is_founder: founder_number zuweisen wenn noch keine
|
|
||||||
if updates.get("is_founder") == 1 and not target["founder_number"]:
|
if updates.get("is_founder") == 1 and not target["founder_number"]:
|
||||||
|
# Neue Gründer-Nummer zuweisen
|
||||||
total = conn.execute(
|
total = conn.execute(
|
||||||
"SELECT COUNT(*) FROM users WHERE is_founder=1"
|
"SELECT COUNT(*) FROM users WHERE is_founder=1"
|
||||||
).fetchone()[0]
|
).fetchone()[0]
|
||||||
if total >= FOUNDER_MAX:
|
if total >= FOUNDER_MAX:
|
||||||
raise HTTPException(400, f"Alle {FOUNDER_MAX} Gründer-Plätze sind vergeben.")
|
raise HTTPException(400, f"Alle {FOUNDER_MAX} Gründer-Plätze sind vergeben.")
|
||||||
updates["founder_number"] = total + 1
|
updates["founder_number"] = total + 1
|
||||||
|
elif updates.get("is_founder") == 0:
|
||||||
|
# Gründer-Status entfernen → founder_number ebenfalls leeren
|
||||||
|
updates["founder_number"] = None
|
||||||
set_clause = ", ".join(f"{k}=?" for k in updates)
|
set_clause = ", ".join(f"{k}=?" for k in updates)
|
||||||
conn.execute(
|
conn.execute(
|
||||||
f"UPDATE users SET {set_clause} WHERE id=?",
|
f"UPDATE users SET {set_clause} WHERE id=?",
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '533'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '536'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
const APP_VERSION = '1.1.2'; // ← semantische Version, wird bei make release gesetzt
|
const APP_VERSION = '1.1.3'; // ← semantische Version, wird bei make release gesetzt
|
||||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||||
|
|
||||||
const App = (() => {
|
const App = (() => {
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,15 @@ window.Page_settings = (() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh() {
|
async function refresh() {
|
||||||
_render();
|
_render();
|
||||||
|
if (_appState?.user) {
|
||||||
|
try {
|
||||||
|
const fresh = await API.auth.me();
|
||||||
|
Object.assign(_appState.user, fresh);
|
||||||
|
_render();
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "/",
|
"id": "/",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"name": "Ban Yaro — Die Hunde-Plattform",
|
"name": "Ban Yaro — Die Hunde-Plattform",
|
||||||
"short_name": "Ban Yaro",
|
"short_name": "Ban Yaro",
|
||||||
"description": "Alles rund um deinen Hund. Von Welpe bis Opa.",
|
"description": "Alles rund um deinen Hund. Von Welpe bis Opa.",
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v556';
|
const CACHE_VERSION = 'by-v559';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue