(
item: ShareItem,
file_service: FileService = Depends(get_file_service),
)
| 544 | |
| 545 | @admin_api.post("/local/share") |
| 546 | async def share_local_file( |
| 547 | item: ShareItem, |
| 548 | file_service: FileService = Depends(get_file_service), |
| 549 | ): |
| 550 | share_info = await file_service.share_local_file(item) |
| 551 | await file_service.record_admin_activity( |
| 552 | action="local_file.share", |
| 553 | target_type="file", |
| 554 | target_id=share_info.get("id") if isinstance(share_info, dict) else None, |
| 555 | target_name=item.filename, |
| 556 | count=1, |
| 557 | meta={ |
| 558 | "expireValue": item.expire_value, |
| 559 | "expireStyle": item.expire_style, |
| 560 | }, |
| 561 | ) |
| 562 | return APIResponse(detail=share_info) |
| 563 | |
| 564 | |
| 565 | @admin_api.patch("/file/update") |
nothing calls this directly
no test coverage detected