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

Function build_select_detail

apps/base/views.py:241–254  ·  view source on GitHub ↗
(
    file_code: FileCodes, file_storage: FileStorageInterface
)

Source from the content-addressed store, hash-verified

239
240
241async def build_select_detail(
242 file_code: FileCodes, file_storage: FileStorageInterface
243) -> dict:
244 metadata = build_file_metadata(file_code)
245 download_url = (
246 None if file_code.text is not None else await file_storage.get_file_url(file_code)
247 )
248 content = file_code.text if file_code.text is not None else None
249 return {
250 **metadata,
251 "text": content if content is not None else download_url,
252 "content": content,
253 "download_url": download_url,
254 }
255
256
257@share_api.get("/metadata/")

Callers 1

select_fileFunction · 0.85

Calls 2

build_file_metadataFunction · 0.85
get_file_urlMethod · 0.45

Tested by

no test coverage detected