// ============================================ // routes/routes.go - VERSION CORRIGΓ‰E COMPLÈTE // ============================================ package routes import ( "gestion/db" "gestion/handlers" "gestion/middleware" "gestion/services" "github.com/gin-gonic/gin" ) func SetupRoutes(router *gin.Engine, database *db.Database, geoService *services.GeoService) { // ============================================ // πŸ” MIDDLEWARE GLOBAL // ============================================ router.Use(func(c *gin.Context) { c.Set("database", database) c.Set("geoService", geoService) }) // ============================================ // πŸ“‹ PATTERN v1: CLIENT API // ============================================ // ============================================ // πŸ‘€ AUTH ROUTES (v1) - PUBLIC // ============================================ authGroupV1 := router.Group("/api/v1/auth") { authGroupV1.POST("/register", handlers.RegisterClient) authGroupV1.POST("/login", handlers.LoginClient) authGroupV1.POST("/logout", handlers.LogoutClient) } // ============================================ // πŸ“¦ PRODUITS (v1) - PUBLIC (SANS middleware!) // ============================================ productsGroupV1 := router.Group("/api/v1") { productsGroupV1.GET("/products", handlers.GetAllProducts) productsGroupV1.GET("/products/:id", handlers.GetProductByID) productsGroupV1.GET("/products/category/:category", handlers.GetProductsByCategory) } // ============================================ // πŸ›’ PANIER (v1) - AVEC CLIENT MIDDLEWARE + SESSION // ============================================ cartGroupV1 := router.Group("/api/v1") cartGroupV1.Use(middleware.ClientMiddleware) cartGroupV1.Use(middleware.ClientSessionMiddleware) { // Panier cartGroupV1.POST("/panier/add", handlers.AddProductsBasket) cartGroupV1.GET("/panier/:username", handlers.GetAllBaskets) cartGroupV1.DELETE("/panier/remove", handlers.DeleteProductFromBasket) cartGroupV1.DELETE("/panier/clear", handlers.ClearBasket) // βœ… CORRIGΓ‰ - Sans :username // Commandes cartGroupV1.POST("/checkout", middleware.OrderHoursMiddleware, handlers.ValidateBasket) // βœ… Auto-assign GPS cartGroupV1.GET("/my-commands", handlers.GetMyCommandsWithTracking) // βœ… Avec suivi // ⭐ NOUVEAUX - SUIVI CLIENT TEMPS RΓ‰EL cartGroupV1.GET("/commands/:id/eta", handlers.GetOrderETA) // βœ… AJOUTΓ‰ cartGroupV1.GET("/commands/:id/status", handlers.GetCommandStatus) // βœ… AJOUTΓ‰ cartGroupV1.GET("/commands/:id/tracking", handlers.GetCommandTracking) // βœ… AJOUTΓ‰ cartGroupV1.GET("/commands/:id", handlers.GetCommandByID) cartGroupV1.GET("/commands/:id/items", handlers.GetCommandItemsWithDetails) // Approbation livraison cartGroupV1.POST("/commands/:id/approve", handlers.ApproveDelivery) // ⭐ NOUVEAU - HISTORIQUE DES COMMANDES TERMINΓ‰ES cartGroupV1.GET("/my-commands/history/detailed", handlers.GetMyCompletedOrdersWithItems) cartGroupV1.GET("/commands/:id/history", handlers.GetOrderHistory) // ⭐ NOUVEAU - ANNULATION DE COMMANDE (CLIENT) cartGroupV1.POST("/commands/:id/cancel", handlers.CancelCommandByClient) cartGroupV1.GET("/my-cancellation-history", handlers.GetMyCancellationHistory) // ⭐ NOUVEAU - HISTORIQUE DES COMMANDES TERMINΓ‰ES cartGroupV1.GET("/my-commands/history", handlers.GetClientCommandsHistory) // ⭐⭐ PΓ‰NALITΓ‰S CLIENT cartGroupV1.GET("/penalties", handlers.GetMyPenalties) // Voir mes pΓ©nalitΓ©s // πŸ‘€ PROFIL CLIENT - MODIFICATION PAR LE CLIENT cartGroupV1.PUT("/profile/update", handlers.UpdateMyProfile) // βœ… Modifier mon profil } // ============================================ // 🌍 GΓ‰OCODAGE PUBLIC (v1) // ============================================ geoGroupV1 := router.Group("/api/v1") { geoGroupV1.POST("/geocode", handlers.GeocodeAddress) geoGroupV1.POST("/validate-address", handlers.ValidateAddress) } // ============================================ // πŸ“‹ PATTERN v2: ADMIN API // ============================================ // ============================================ // πŸ‘€ ADMIN AUTH (v2) - PUBLIC // ============================================ adminAuthGroupV2 := router.Group("/api/v2/admin/auth") { adminAuthGroupV2.POST("/register", handlers.RegisterAdmin) adminAuthGroupV2.POST("/login", handlers.LoginAdmin) adminAuthGroupV2.POST("/logout", handlers.LogoutAdmin) } // ============================================ // πŸ”’ ADMIN PROTECTED (v2) - AVEC ADMIN MIDDLEWARE // ============================================ adminGroupV2 := router.Group("/api/v2/admin/protected") adminGroupV2.Use(middleware.AdminMiddleware) { // ============================================ // CLIENT - GESTION // ============================================ adminGroupV2.GET("/all/clients", handlers.GetAllClients) adminGroupV2.GET("/all/users", handlers.GetAllUsers) // ⭐⭐ MODIFICATION DE PROFILS PAR ADMIN adminGroupV2.PUT("/clients/:id", handlers.UpdateClientByAdmin) // βœ… Modifier un client adminGroupV2.PUT("/users/:id", handlers.UpdateUserByAdmin) // βœ… Modifier un user adminGroupV2.DELETE("/clients/:id", handlers.DeleteClient) adminGroupV2.DELETE("/users/:id", handlers.DeleteUser) adminGroupV2.POST("/users", handlers.CreateUser) // Get location livreur adminGroupV2.GET("/commands/:id/deliveryman/location", handlers.GetDeliverymanLocationForCommand) // ============================================ // ADDRESSES - GESTION // ============================================ adminGroupV2.POST("/add/address", handlers.AddAddress) adminGroupV2.DELETE("/delete/address", handlers.DeleteAddress) adminGroupV2.GET("/addresses", handlers.GetAllAddress) // ============================================ // PRODUITS - GESTION // ============================================ adminGroupV2.POST("/products", handlers.CreateProduct) adminGroupV2.GET("/products", handlers.GetAllProducts) adminGroupV2.GET("/products/:id", handlers.GetProductByID) adminGroupV2.PUT("/products/update/:id", handlers.UpdateProduct) adminGroupV2.DELETE("/products/:id", handlers.DeleteProduct) adminGroupV2.POST("/products/:id/media", handlers.UploadMedia) adminGroupV2.DELETE("/products/:id/media/:media_id", handlers.DeleteMedia) // ============================================ // COMMANDES - GESTION DE BASE // ============================================ adminGroupV2.GET("/orders", handlers.GetAllCommands) adminGroupV2.GET("/orders/:id", handlers.GetCommandByID) adminGroupV2.PUT("/orders/:id/address", handlers.UpdateCommandAddress) adminGroupV2.POST("/orders/:id/force-validate", handlers.ValidateDelivery) // ============================================ // ⭐ AUTO-ASSIGNATION GPS - ROUTES CRITIQUES // ============================================ adminGroupV2.POST("/orders/:id/auto-assign", handlers.AutoAssignNearestDeliveryPerson) adminGroupV2.POST("/orders/auto-assign-all", handlers.AutoAssignAllPendingCommands) // ============================================ // RECHERCHE DU LIVREUR LE PLUS PROCHE // ============================================ adminGroupV2.POST("/delivery/nearest", handlers.FindNearestDeliveryPerson) adminGroupV2.POST("/delivery/distances", handlers.GetAllDeliveryDistances) // ============================================ // GESTION DES QUEUES DES LIVREURS // ============================================ adminGroupV2.GET("/delivery/queues", handlers.GetAllDeliveryQueues) adminGroupV2.GET("/delivery/:username/queue", handlers.GetDeliverymanQueue) // ============================================ // GΓ‰OCODAGE (Admin uniquement) // ============================================ adminGroupV2.POST("/validate-address", handlers.ValidateAddress) adminGroupV2.POST("/geocode", handlers.GeocodeAddress) // ============================================ // GESTION LIVREURS // ============================================ adminGroupV2.GET("/delivery-persons", handlers.GetAvailableDeliveryPersons) adminGroupV2.GET("/delivery-persons/:username", handlers.GetDeliveryPersonDetails) adminGroupV2.POST("/delivery-persons/:username/assign/:command_id", handlers.AssignDeliveryPerson) adminGroupV2.PUT("/delivery-persons/:username/status", handlers.UpdateDeliveryPersonStatusAdmin) adminGroupV2.GET("/delivery-persons/:username/stats", handlers.GetDeliveryPersonStats) adminGroupV2.GET("/delivery-persons/:username/history", handlers.GetDeliveryPersonHistory) adminGroupV2.GET("/delivery-persons/:username/location", handlers.GetDeliveryPersonLocation) // ⭐ AJOUTΓ‰ adminGroupV2.PUT("/delivery-persons/update/:username/location", handlers.UpdateDeliveryPersonLocationAdmin) adminGroupV2.DELETE("/delivery-persons/:username/queue/:command_id", handlers.RemoveCommandFromQueue) adminGroupV2.GET("/delivery-persons/:username/map-links", handlers.GetDeliveryPersonMapLinks) // Commandes annulΓ©es adminGroupV2.GET("/orders/cancelled", handlers.GetAllCancelledOrders) // ============================================ // ⭐⭐ PΓ‰NALITΓ‰S - GESTION ADMIN // ============================================ adminGroupV2.POST("/penalty", handlers.ApplyClientPenalty) // Appliquer pΓ©nalitΓ© adminGroupV2.GET("/client/:username/penalties", handlers.GetClientPenaltiesAdmin) // Voir pΓ©nalitΓ©s client adminGroupV2.POST("/client/:username/penalties/reset", handlers.ResetClientPenaltiesAdmin) // Reset pΓ©nalitΓ©s adminGroupV2.GET("/penalties/all", handlers.GetAllClientsWithPenalties) // Liste clients avec pΓ©nalitΓ©s adminGroupV2.GET("/penalties/stats", handlers.GetPenaltiesStats) // ============================================ // ⭐⭐ ALERTES POLICE - GESTION ADMIN // ============================================ adminGroupV2.GET("/alerts/:id", handlers.GetAlert) // DΓ©tails d'une alerte adminGroupV2.DELETE("/delete/alerts/:id", handlers.DeleteAlert) // Supprimer une alerte adminGroupV2.GET("/alerts", handlers.GetActiveAlerts) // ⭐ AJOUTΓ‰ - Toutes les alertes actives adminGroupV2.GET("/all/alerts", handlers.GetAllAlerts) } // ============================================ // πŸ‘¨β€πŸ’Ό CABINE ROUTES (v1) - AVEC CABINE MIDDLEWARE // ============================================ cabineGroupV1 := router.Group("/api/v1/cabine") cabineGroupV1.Use(middleware.CabineMiddleware) { cabineGroupV1.GET("/commands/:id/items", handlers.ShowItems) cabineGroupV1.PUT("/items/:item_id/status", handlers.UpdateItemStatus) cabineGroupV1.GET("/commands/:id/deliveryman/location", handlers.GetDeliverymanLocationForCommand) cabineGroupV1.GET("/all/deliveryman", handlers.GetAllDeliveryMen) cabineGroupV1.DELETE("/commands/:id", handlers.DeleteCommandByCabine) // ⭐ NOUVEAU - ANNULATION PAR CABINE cabineGroupV1.GET("/commands/cancelled", handlers.GetAllCancelledOrders) cabineGroupV1.GET("/client/:username/penalties", handlers.GetClientPenaltiesAdmin) // Voir pΓ©nalitΓ©s client cabineGroupV1.POST("/client/:username/penalties/reset", handlers.ResetClientPenaltiesAdmin) // Reset pΓ©nalitΓ©s cabineGroupV1.POST("/client/:username/point/reset", handlers.ResetClientPointAdmin) cabineGroupV1.GET("/penalties/all", handlers.GetAllClientsWithPenalties) // Liste clients avec pΓ©nalitΓ©s cabineGroupV1.GET("/penalties/stats", handlers.GetPenaltiesStats) // ============================================ // ⭐⭐ ALERTES POLICE - CONSULTATION CABINE // ============================================ cabineGroupV1.GET("/alerts/:id", handlers.GetAlert) // DΓ©tails d'une alerte cabineGroupV1.GET("/alerts", handlers.GetActiveAlerts) // ⭐ AJOUTΓ‰ - Toutes les alertes actives cabineGroupV1.GET("/all/alerts", handlers.GetAllAlerts) } // ============================================ // πŸ‘¨β€πŸšš LIVREUR ROUTES (v1) - AVEC LIVREUR MIDDLEWARE // ============================================ livreurGroupV1 := router.Group("/api/v1/livreur") livreurGroupV1.Use(middleware.LivreurMiddleware) { // ============================================ // LIVRAISONS // ============================================ livreurGroupV1.GET("/deliveries", handlers.GetMyDeliveries) // βœ… DonnΓ©es filtrΓ©es livreurGroupV1.GET("/deliveries/:id", handlers.GetDeliveryDetails) // βœ… DΓ©tail filtrΓ© livreurGroupV1.POST("/deliveries/:id/start", handlers.StartDelivery) livreurGroupV1.PUT("/deliveries/:id/status", handlers.UpdateDeliveryStatus) // βœ… Avec GPS // ============================================ // POSITION GPS // ============================================ livreurGroupV1.POST("/location/update", handlers.UpdateLivreurLocation) livreurGroupV1.GET("/location", handlers.GetMyLocation) // ============================================ // STATUT LIVREUR // ============================================ livreurGroupV1.POST("/update/status", handlers.UpdateDeliveryPersonStatus) livreurGroupV1.GET("/status", handlers.GetMyStatus) // ============================================ // QUEUE PERSONNELLE // ============================================ livreurGroupV1.GET("/queue", handlers.GetMyQueue) // ============================================ // ALERTES POLICE // ============================================ livreurGroupV1.POST("/alert", handlers.AlertPolice) // ⭐ AJOUTΓ‰ - CrΓ©er une alerte livreurGroupV1.DELETE("/alert/:id", handlers.EndAlert) // Mettre fin Γ  une alerte livreurGroupV1.GET("/alerts", handlers.GetMyAlerts) // Voir mes alertes livreurGroupV1.GET("/alert/:id", handlers.GetAlert) // DΓ©tail d'une alerte } } // ============================================ // πŸ“ DOCUMENTATION COMPLÈTE // ============================================ /* LISTE COMPLÈTE DES ROUTES: ═══════════════════════════════════════════════════════════════ CLIENT API (v1) - /api/v1 ═══════════════════════════════════════════════════════════════ πŸ“Œ AUTH (PUBLIC) POST /api/v1/auth/register βœ… CrΓ©er compte client POST /api/v1/auth/login βœ… Login client POST /api/v1/auth/logout βœ… Logout client πŸ“Œ PRODUITS (PUBLIC) GET /api/v1/products βœ… Tous les produits GET /api/v1/products/:id βœ… Un produit GET /api/v1/products/category/:cat βœ… Par catΓ©gorie GET /api/v1/health βœ… Health check πŸ“Œ GΓ‰OCODAGE (PUBLIC) POST /api/v1/geocode βœ… Convertir adresse en GPS POST /api/v1/validate-address βœ… Valider une adresse πŸ“Œ PANIER (AUTH CLIENT) πŸ”’ POST /api/v1/panier/add βœ… Ajouter au panier GET /api/v1/panier/:username βœ… Voir panier DELETE /api/v1/panier/remove βœ… Supprimer du panier DELETE /api/v1/panier/clear βœ… Vider panier πŸ“Œ COMMANDES (AUTH CLIENT) πŸ”’ POST /api/v1/checkout βœ… Valider panier β†’ AUTO-ASSIGN GPS GET /api/v1/my-commands βœ… Mes commandes avec suivi GET /api/v1/commands/:id/eta ⭐ NOUVEAU - ETA de la commande GET /api/v1/commands/:id/status ⭐ NOUVEAU - Statut temps rΓ©el GET /api/v1/commands/:id/tracking ⭐ NOUVEAU - Timeline dΓ©taillΓ©e POST /api/v1/commands/:id/approve βœ… Approuver livraison POST /api/v1/commands/:id/cancel ⭐ NOUVEAU - Annuler commande GET /api/v1/my-cancellation-history ⭐ NOUVEAU - Historique annulations GET /api/v1/my-commands/history ⭐ NOUVEAU - Historique commandes GET /api/v1/my-commands/history/detailed ⭐ NOUVEAU - Historique dΓ©taillΓ© GET /api/v1/commands/:id/history ⭐ NOUVEAU - Historique d'une commande πŸ“Œ PΓ‰NALITΓ‰S (AUTH CLIENT) πŸ”’ GET /api/v1/penalties ⭐ NOUVEAU - Voir mes pΓ©nalitΓ©s πŸ“Œ PROFIL (AUTH CLIENT) πŸ”’ PUT /api/v1/profile/update ⭐⭐ NOUVEAU - Modifier mon profil ═══════════════════════════════════════════════════════════════ ADMIN API (v2) - /api/v2/admin ═══════════════════════════════════════════════════════════════ πŸ“Œ AUTH (PUBLIC) POST /api/v2/admin/auth/register βœ… CrΓ©er compte admin POST /api/v2/admin/auth/login βœ… Login admin POST /api/v2/admin/auth/logout βœ… Logout admin πŸ“Œ GESTION UTILISATEURS (AUTH ADMIN) πŸ”’ GET /api/v2/admin/protected/all/clients βœ… Liste tous les clients GET /api/v2/admin/protected/all/users βœ… Liste tous les users PUT /api/v2/admin/protected/clients/:id ⭐⭐ NOUVEAU - Modifier un client PUT /api/v2/admin/protected/users/:id ⭐⭐ NOUVEAU - Modifier un user πŸ“Œ PRODUITS (AUTH ADMIN) πŸ”’ GET /api/v2/admin/protected/products βœ… Tous produits POST /api/v2/admin/protected/products βœ… CrΓ©er produit GET /api/v2/admin/protected/products/:id βœ… DΓ©tail produit PUT /api/v2/admin/protected/products/:id βœ… Modifier produit DELETE /api/v2/admin/protected/products/:id βœ… Supprimer produit πŸ“Œ COMMANDES (AUTH ADMIN) πŸ”’ GET /api/v2/admin/protected/orders βœ… Toutes commandes GET /api/v2/admin/protected/orders/:id βœ… DΓ©tail commande PUT /api/v2/admin/protected/orders/:id/address βœ… Modifier adresse POST /api/v2/admin/protected/orders/:id/force-validate βœ… Forcer validation GET /api/v2/admin/protected/orders/cancelled βœ… Commandes annulΓ©es GET /api/v2/admin/protected/commands/:id/deliveryman/location βœ… Position livreur pour commande πŸ“Œ AUTO-ASSIGNATION GPS (AUTH ADMIN) πŸ”’ ⭐ POST /api/v2/admin/protected/orders/:id/auto-assign βœ… Assigner 1 commande POST /api/v2/admin/protected/commands/auto-assign-all βœ… Assigner toutes πŸ“Œ RECHERCHE LIVREUR (AUTH ADMIN) πŸ”’ ⭐ POST /api/v2/admin/protected/delivery/nearest βœ… Livreur le plus proche POST /api/v2/admin/protected/delivery/distances βœ… Tous livreurs + distances πŸ“Œ GESTION QUEUES (AUTH ADMIN) πŸ”’ ⭐ GET /api/v2/admin/protected/delivery/queues βœ… Toutes les queues GET /api/v2/admin/protected/delivery/:username/queue βœ… Queue d'un livreur πŸ“Œ VISUALISATION (AUTH ADMIN) πŸ”’ ⭐ GET /api/v2/admin/protected/delivery/heatmap βœ… Heatmap livreurs πŸ“Œ GΓ‰OCODAGE (AUTH ADMIN) πŸ”’ POST /api/v2/admin/protected/geocode βœ… Convertir adresse POST /api/v2/admin/protected/validate-address βœ… Valider adresse πŸ“Œ GESTION LIVREURS (AUTH ADMIN) πŸ”’ GET /api/v2/admin/protected/delivery-persons βœ… Liste livreurs GET /api/v2/admin/protected/delivery-persons/:username βœ… DΓ©tails d'un livreur GET /api/v2/admin/protected/delivery-persons/:username/stats βœ… Statistiques livreur GET /api/v2/admin/protected/delivery-persons/:username/history βœ… Historique livreur GET /api/v2/admin/protected/delivery-persons/:username/location ⭐ NOUVEAU - Position GPS livreur PUT /api/v2/admin/protected/delivery-persons/:username/location βœ… Modifier position livreur PUT /api/v2/admin/protected/delivery-persons/:username/status βœ… Modifier statut livreur POST /api/v2/admin/protected/delivery-persons/:username/assign/:command_id βœ… Assigner manuellement DELETE /api/v2/admin/protected/delivery-persons/:username/queue/:command_id βœ… Retirer de la queue GET /api/v2/admin/protected/delivery-persons/:username/map-links βœ… Liens carte πŸ“Œ PΓ‰NALITΓ‰S (AUTH ADMIN) πŸ”’ POST /api/v2/admin/protected/penalty βœ… Appliquer pΓ©nalitΓ© GET /api/v2/admin/protected/client/:username/penalties βœ… Voir pΓ©nalitΓ©s client POST /api/v2/admin/protected/client/:username/penalties/reset βœ… Reset pΓ©nalitΓ©s GET /api/v2/admin/protected/penalties/all βœ… Tous clients avec pΓ©nalitΓ©s GET /api/v2/admin/protected/penalties/stats βœ… Stats pΓ©nalitΓ©s ═══════════════════════════════════════════════════════════════ CABINE API (v1) - /api/v1/cabine ═══════════════════════════════════════════════════════════════ πŸ“Œ GESTION ITEMS (AUTH CABINE) πŸ”’ GET /api/v1/cabine/commands/:id/items βœ… Voir items d'une commande PUT /api/v1/cabine/items/:item_id/status βœ… Changer statut item GET /api/v1/cabine/commands/cancelled βœ… Commandes annulΓ©es GET /api/v1/cabine/commands/:id/deliveryman/location βœ… Position livreur pour commande πŸ“Œ PΓ‰NALITΓ‰S (AUTH CABINE) πŸ”’ POST /api/v1/cabine/penalty βœ… Appliquer pΓ©nalitΓ© GET /api/v1/cabine/client/:username/penalties βœ… Voir pΓ©nalitΓ©s client POST /api/v1/cabine/client/:username/penalties/reset βœ… Reset pΓ©nalitΓ©s GET /api/v1/cabine/penalties/all βœ… Tous clients avec pΓ©nalitΓ©s GET /api/v1/cabine/penalties/stats βœ… Stats pΓ©nalitΓ©s ═══════════════════════════════════════════════════════════════ LIVREUR API (v1) - /api/v1/livreur ═══════════════════════════════════════════════════════════════ πŸ“Œ LIVRAISONS (AUTH LIVREUR) πŸ”’ GET /api/v1/livreur/deliveries βœ… Mes livraisons (DONNΓ‰ES FILTRΓ‰ES) GET /api/v1/livreur/deliveries/:id ⭐ NOUVEAU - DΓ©tail livraison POST /api/v1/livreur/deliveries/:id/start βœ… DΓ©marrer livraison PUT /api/v1/livreur/deliveries/:id/status βœ… Changer statut (AVEC GPS) πŸ“Œ POSITION GPS (AUTH LIVREUR) πŸ”’ POST /api/v1/livreur/location/update βœ… Mettre Γ  jour ma position GET /api/v1/livreur/location βœ… Voir ma position actuelle πŸ“Œ STATUT (AUTH LIVREUR) πŸ”’ POST /api/v1/livreur/status βœ… Changer mon statut GET /api/v1/livreur/status βœ… Voir mon statut πŸ“Œ QUEUE (AUTH LIVREUR) πŸ”’ GET /api/v1/livreur/queue βœ… Voir ma queue de livraisons */ // ============================================ // πŸ”§ CORRECTIONS APPLIQUΓ‰ES // ============================================ /* βœ… 1. Route ETA ajoutΓ©e: GET /api/v1/commands/:id/eta βœ… 2. Route tracking dΓ©taillΓ©e: GET /api/v1/commands/:id/tracking βœ… 3. Route status temps rΓ©el: GET /api/v1/commands/:id/status βœ… 4. Panier clear sans :username (utilise JWT) βœ… 5. GeoService injectΓ© dans le contexte global βœ… 6. Routes livreur pour GPS et statut βœ… 7. Routes admin pour gestion manuelle livreurs ⭐⭐ 8. Routes modification profil CLIENT par le client: PUT /api/v1/profile/update ⭐⭐ 9. Routes modification profil CLIENT par admin: PUT /api/v2/admin/protected/clients/:id ⭐⭐ 10. Routes modification profil USER par admin: PUT /api/v2/admin/protected/users/:id ⭐⭐ 11. Route position GPS livreur par admin: GET /api/v2/admin/protected/delivery-persons/:username/location */