Fix: Hive sync et update entité via API REST

- Correction mapping JSON membres (fk_role, chk_active)
- Ajout traitement amicale au login
- Fix callback onSubmit pour sync Hive après update API
This commit is contained in:
d6soft
2025-06-09 18:46:49 +02:00
parent 15a0f2d2be
commit f3f1a9c5e8
56 changed files with 141860 additions and 142386 deletions

View File

@@ -43,6 +43,7 @@ class Router {
$this->get('entites', ['EntiteController', 'getEntites']);
$this->get('entites/:id', ['EntiteController', 'getEntiteById']);
$this->get('entites/postal/:code', ['EntiteController', 'getEntiteByPostalCode']);
$this->put('entites/:id', ['EntiteController', 'updateEntite']);
// Routes villes
$this->get('villes', ['VilleController', 'searchVillesByPostalCode']);
@@ -187,7 +188,8 @@ class Router {
error_log("Routes disponibles pour $method: " . implode(', ', array_keys($this->routes[$method])));
foreach ($this->routes[$method] as $route => $handler) {
$pattern = preg_replace('/{[^}]+}/', '([^/]+)', $route);
// Correction: utiliser :param au lieu de {param}
$pattern = preg_replace('/:([^\/]+)/', '([^/]+)', $route);
$pattern = "@^" . $pattern . "$@D";
error_log("Test pattern: $pattern contre uri: $uri");