MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / build_dashboard_recent_file

Function build_dashboard_recent_file

apps/admin/views.py:70–84  ·  view source on GitHub ↗
(file_code: FileCodes)

Source from the content-addressed store, hash-verified

68
69
70async def build_dashboard_recent_file(file_code: FileCodes) -> dict:
71 is_expired = await file_code.is_expired()
72 return {
73 "id": file_code.id,
74 "code": file_code.code,
75 "name": file_code.prefix + file_code.suffix,
76 "suffix": file_code.suffix,
77 "size": file_code.size,
78 "text": file_code.text is not None,
79 "expiredAt": file_code.expired_at,
80 "expiredCount": file_code.expired_count,
81 "usedCount": file_code.used_count,
82 "createdAt": file_code.created_at,
83 "isExpired": is_expired,
84 }
85
86
87@admin_api.get("/dashboard")

Callers 1

dashboardFunction · 0.85

Calls 1

is_expiredMethod · 0.45

Tested by

no test coverage detected