diff --git a/apps/api/app/api/routes/auth.py b/apps/api/app/api/routes/auth.py old mode 100755 new mode 100644 index c6a1a9c6e..4855f3a07 --- a/apps/api/app/api/routes/auth.py +++ b/apps/api/app/api/routes/auth.py @@ -569,7 +569,7 @@ async def bind_contact( verification_code_service=vc_service, ) uc_request = UseCaseRequest( - user_id=current_user.user_id, + user_id=current_user.user.id, phone=request.phone, phone_code=request.phone_code, email=request.email, diff --git a/apps/api/app/api/routes/templates_editor.py b/apps/api/app/api/routes/templates_editor.py index 617ecd62c..1fb6ae6b7 100644 --- a/apps/api/app/api/routes/templates_editor.py +++ b/apps/api/app/api/routes/templates_editor.py @@ -649,7 +649,7 @@ def get_draft_plan_id( tpl_svc, _ = services draft = tpl_svc.get_or_create_draft( template_id, - user_id=str(current_user.user_id), + user_id=str(current_user.user.id), ) return draft.id @@ -1084,7 +1084,7 @@ def update_editor_bgm( template_id, plan_id, current_bgm.get("enabled", False), - current_user.user_id, + current_user.user.id, ) return { @@ -1332,7 +1332,7 @@ def generate_editor_draft( clip_count = plan_svc.mark_clips_ready(plan_id) gen_task_repo = SQLAlchemyGenerationTaskRepository(db) - user_id = current_user.user_id + user_id = current_user.user.id _check_queue_limits(gen_task_repo, user_id) gen_task_use_case = CreateGenerationTaskUseCase(gen_task_repo) @@ -1342,7 +1342,7 @@ def generate_editor_draft( CreateGenerationTaskCommand( project_id=plan.project_id or "", template_id=plan.template_id, - created_by_user_id=current_user.user_id, + created_by_user_id=current_user.user.id, source_edit_plan_id=plan_id, asset_ids=list(config_asset_ids) if config_asset_ids else [], ), @@ -1360,7 +1360,7 @@ def generate_editor_draft( plan_id, gen_task.id, clip_count, - current_user.user_id, + current_user.user.id, ) return EditPlanGenerateResponse( @@ -1891,7 +1891,7 @@ def editor_ai_recommend( plan_id, len(result["clips"]), result["total_duration"], - current_user.user_id, + current_user.user.id, ) return AIRecommendResponse( @@ -1946,7 +1946,7 @@ def editor_generate_cover( template_id, plan_id, body.cover_type, - current_user.user_id, + current_user.user.id, ) return GenerateCoverResponse(plan_id=plan_id, cover=cover_data) @@ -2362,7 +2362,7 @@ def extract_editor_cover( template_id, plan_id, body.clip_id, - current_user.user_id, + current_user.user.id, ) return CoverGenerateResponse( @@ -2404,7 +2404,7 @@ def smart_editor_cover( template_id, plan_id, body.strategy, - current_user.user_id, + current_user.user.id, ) return CoverGenerateResponse( @@ -2485,7 +2485,7 @@ def create_clips_from_assets_editor( template_id, plan_id, len(clips), - current_user.user_id, + current_user.user.id, ) return ClipsFromAssetsResponse( diff --git a/apps/api/app/api/routes/videos.py b/apps/api/app/api/routes/videos.py old mode 100755 new mode 100644 index e8a0b52bd..e01c94e7c --- a/apps/api/app/api/routes/videos.py +++ b/apps/api/app/api/routes/videos.py @@ -113,7 +113,7 @@ def update_video_review_status( if item is None: raise HTTPException(status_code=404, detail="Video not found") logger.info( - "Video %s review status updated to %s by user %s", video_id, request.review_status, current_user.user_id + "Video %s review status updated to %s by user %s", video_id, request.review_status, current_user.user.id ) return _to_video_response(item, storage) @@ -197,7 +197,7 @@ def batch_download_videos( # 发送 celery 任务 task = celery_app.send_task( "worker.batch_download_videos", - args=[request.video_ids, current_user.user_id], + args=[request.video_ids, current_user.user.id], ) logger.info("Batch download job created: %s, videos=%d", task.id, len(request.video_ids))