Show IPA version in operation logs
This commit is contained in:
@@ -298,8 +298,9 @@ async def get_download_link(task_id: str, request: Request, user: dict = Depends
|
||||
from .config import load_config
|
||||
from ..config import DOWNLOAD_URL_EXPIRE_SECONDS
|
||||
from ..services.distribution import DistributionError, get_published_download_url
|
||||
task_config = json.loads(task.config_json or "{}")
|
||||
download_url = get_published_download_url(
|
||||
json.loads(task.config_json or "{}"),
|
||||
task_config,
|
||||
load_config().get("upload", {}),
|
||||
task.oss_url,
|
||||
)
|
||||
@@ -319,7 +320,7 @@ async def get_download_link(task_id: str, request: Request, user: dict = Depends
|
||||
from ..services.audit_log import record_operation
|
||||
record_operation(db, user, "ipa_download_requested", request=request, task=task,
|
||||
resource_type="ipa", resource_name=task.oss_url,
|
||||
detail={"controlled": True})
|
||||
detail={"controlled": True, "version": task_config.get("VERSION", "")})
|
||||
db.commit()
|
||||
return {"url": download_url, "expires_in": DOWNLOAD_URL_EXPIRE_SECONDS}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user