🔧 chore: 同步完整后端运行模块
This commit is contained in:
1 parent
d104b9fc8b
commit
2d44699eec
20 files changed
+1465
-235
No files matched your search
@@ -17,7 +17,7 @@ from core.settings import (
|
||||
)
|
||||
from core.config import refresh_settings
|
||||
from core.security import INTERNAL_CONFIG_KEYS, generate_jwt_secret
|
||||
from apps.base.models import FileCodes, KeyValue, TransferStats, file_codes_pydantic
|
||||
from apps.base.models import FileCodes, KeyValue, ShareCodeReservations, TransferStats, file_codes_pydantic
|
||||
|
||||
from apps.base.utils import get_expire_info, get_file_path_name, get_random_code
|
||||
from apps.base.quota import release_storage, reserve_storage
|
||||
@@ -180,6 +180,11 @@ class FileService:
|
||||
original_path,
|
||||
)
|
||||
file_code.file_path = destination_dir
|
||||
original_code = file_code.code
|
||||
await ShareCodeReservations.get_or_create(
|
||||
code=original_code,
|
||||
defaults={"file_code_id": file_code.id, "reason": "restored"},
|
||||
)
|
||||
file_code.code = await get_random_code()
|
||||
file_code.is_trashed = False
|
||||
file_code.trashed_at = None
|
||||
|
||||
Reference in new issue
Block a user