MCPcopy Create free account
hub / github.com/binkuolo/fastapi / get_access_log

Function get_access_log

api/endpoints/user.py:238–247  ·  view source on GitHub ↗

查询当前用户访问记录 :param req: :return:

(req: Request)

Source from the content-addressed store, hash-verified

236
237@router.get("/access/log", dependencies=[Security(check_permissions)], summary="用户访问记录")
238async def get_access_log(req: Request):
239 """
240 查询当前用户访问记录
241 :param req:
242 :return:
243 """
244 log = await AccessLog().filter(user_id=req.state.user_id).limit(10).order_by("-create_time") \
245 .values("create_time", "ip", "note", "id")
246
247 return success(msg="access log", data=log)
248
249
250@router.put("/info", dependencies=[Security(check_permissions)], summary="用户基本信息修改")

Callers

nothing calls this directly

Calls 2

AccessLogClass · 0.90
successFunction · 0.90

Tested by

no test coverage detected