(
file_code: FileCodes, file_storage: FileStorageInterface
)
| 239 | |
| 240 | |
| 241 | async 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/") |
no test coverage detected