feat: cont demo public cu resetare automată a datelor la 3 ore
- Cont demo (demo@example.com/demo1234) activ implicit, identificat prin settings.demo_email — fără configurare în env; DEMO_EMAIL="" îl dezactivează - Contul demo nu poate fi modificat prin API (email/parolă/status blocate 403) - reset_demo.py: șterge idempotent toate datele demo și recrează proprietatea demo cu 3 spații și 5 rezervări exemplu cu date relative la ziua curentă - entrypoint.sh: reset la boot + buclă la 3h (DEMO_RESET_INTERVAL) - start.sh (dev): reset la fiecare pornire - Login.vue: hint cu credențialele demo (click = precompletare) și mesajul de resetare la 3 ore Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4
start.sh
4
start.sh
@@ -87,6 +87,10 @@ start_services() {
|
||||
cd "$BACKEND_DIR" && python seed_db.py
|
||||
fi
|
||||
|
||||
# (Re)create the demo account and its sample data (idempotent)
|
||||
echo -e "${GREEN}[Backend] Resetting demo account...${NC}"
|
||||
(cd "$BACKEND_DIR" && python reset_demo.py) || echo -e "${YELLOW}[Backend] Demo reset failed (continuing)${NC}"
|
||||
|
||||
echo -e "${GREEN}[Backend] Starting on :${BACKEND_PORT}${NC}"
|
||||
cd "$BACKEND_DIR" && uvicorn app.main:app --reload --host 0.0.0.0 --port $BACKEND_PORT &
|
||||
BACKEND_PID=$!
|
||||
|
||||
Reference in New Issue
Block a user