072: regles automatiques eteintes par defaut (reglage regles_auto), plus de course ni de regle proposee automatiques
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XGaEeTZLvHXfYPUNWkgYoi
This commit is contained in:
1 parent
883b4e1745
commit
5d98d08a8b
6 files changed
+112
-5
No files matched your search
@@ -345,3 +345,23 @@ def creer_routeur(mirror_client) -> APIRouter:
|
||||
return {"analyses": lister(depuis=debut, n=n)}
|
||||
|
||||
return router
|
||||
|
||||
|
||||
def _routeur_regles_auto():
|
||||
from fastapi import APIRouter
|
||||
from pydantic import BaseModel
|
||||
from app import classifier as _c
|
||||
r = APIRouter()
|
||||
|
||||
class Etat(BaseModel):
|
||||
actif: bool
|
||||
|
||||
@r.get("/regles/auto")
|
||||
def lire_regles_auto():
|
||||
return {"actif": _c.regles_auto_actives()}
|
||||
|
||||
@r.put("/regles/auto")
|
||||
def regler_regles_auto(e: Etat):
|
||||
_c.regler_regles_auto(e.actif)
|
||||
return {"actif": _c.regles_auto_actives()}
|
||||
return r
|
||||
Reference in new issue
Block a user