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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user