| 1802 | role_name = str(role_name or "").strip() |
| 1803 | if not role_name: |
| 1804 | raise ValueError("role_name is required") |
| 1805 | result = role_manager.delete_role(role_name) |
| 1806 | return {"result": result, **list_roles()} |
| 1807 | |
| 1808 | |
| 1809 | def get_profile(user_id: str) -> Dict[str, Any]: |
| 1810 | profile = db_ops.get_profile(user_id) |
| 1811 | return {"profile": _profile_summary(profile), "raw": profile} |
| 1812 | |
| 1813 | |
| 1814 | def list_must_read(user_id: str) -> Dict[str, Any]: |
| 1815 | profile = db_ops.get_profile(user_id) or {} |
| 1816 | must_read = profile.get("must_read") or {"authors": [], "institutions": [], "keywords": []} |