fix(config): add individual menu CRUD endpoints and fix frontend menu data handling
- Add POST /config/menus (create single menu)
- Add PUT /config/menus/{id} (update single menu)
- Add DELETE /config/menus/{id} (soft delete single menu)
- Frontend MenuConfig was calling individual CRUD routes that didn't exist,
causing 404 errors on all create/update/delete operations
- Fix frontend to correctly handle nested tree response from backend
This commit is contained in:
@@ -56,7 +56,14 @@ impl ConfigModule {
|
||||
// Menu routes
|
||||
.route(
|
||||
"/config/menus",
|
||||
get(menu_handler::get_menus).put(menu_handler::batch_save_menus),
|
||||
get(menu_handler::get_menus)
|
||||
.post(menu_handler::create_menu)
|
||||
.put(menu_handler::batch_save_menus),
|
||||
)
|
||||
.route(
|
||||
"/config/menus/{id}",
|
||||
put(menu_handler::update_menu)
|
||||
.delete(menu_handler::delete_menu),
|
||||
)
|
||||
// Setting routes
|
||||
.route(
|
||||
|
||||
Reference in New Issue
Block a user