MCPcopy Index your code
hub / github.com/dataease/SQLBot / query

Function query

backend/apps/system/api/user.py:157–163  ·  view source on GitHub ↗
(session: SessionDep, trans: Trans, id: int = Path(description=f"{PLACEHOLDER_PREFIX}uid"))

Source from the content-addressed store, hash-verified

155@router.get("/{id}", response_model=UserEditor, summary=f"{PLACEHOLDER_PREFIX}user_detail_api", description=f"{PLACEHOLDER_PREFIX}user_detail_api")
156@require_permissions(permission=SqlbotPermission(role=['admin']))
157async def query(session: SessionDep, trans: Trans, id: int = Path(description=f"{PLACEHOLDER_PREFIX}uid")) -> UserEditor:
158 db_user: UserModel = get_db_user(session = session, user_id = id)
159 u_ws_options = await user_ws_options(session, id, trans)
160 result = UserEditor.model_validate(db_user.model_dump())
161 if u_ws_options:
162 result.oid_list = [item.id for item in u_ws_options]
163 return result
164
165
166@router.post("", summary=f"{PLACEHOLDER_PREFIX}user_create_api", description=f"{PLACEHOLDER_PREFIX}user_create_api")

Callers

nothing calls this directly

Calls 2

get_db_userFunction · 0.90
user_ws_optionsFunction · 0.90

Tested by

no test coverage detected