|
|
@@ -270,8 +270,9 @@ async def get_user_routers(db, user_id):
|
|
|
res = permissions[parent_id].to_router_dict()
|
|
|
res["children"] = [get_child(i["id"]) for i in tmp_dit.get(parent_id, [])]
|
|
|
return res
|
|
|
-
|
|
|
- return {"routers": [get_child(i["id"]) for i in tmp_dit.get(parent_id, [])]}
|
|
|
+ select_list = [get_child(i["id"]) for i in tmp_dit.get(parent_id, [])]
|
|
|
+ sorted_permission_list = sorted(select_list, key=lambda x: x['seq'], reverse=True)
|
|
|
+ return {"routers": sorted_permission_list}
|
|
|
|
|
|
|
|
|
async def get_user_menus(db, user_id):
|