From 08265a85ec88304ca154412982909162dd63c107 Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Fri, 25 Jul 2025 15:10:03 +0800 Subject: [PATCH] refactor: Include new file path in response after moving model --- py/routes/lora_routes.py | 2 +- static/js/api/baseModelApi.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/py/routes/lora_routes.py b/py/routes/lora_routes.py index f88d03ec..84776eb5 100644 --- a/py/routes/lora_routes.py +++ b/py/routes/lora_routes.py @@ -345,7 +345,7 @@ class LoraRoutes(BaseModelRoutes): success = await self.service.scanner.move_model(file_path, target_path) if success: - return web.json_response({'success': True}) + return web.json_response({'success': True, 'new_file_path': target_file_path}) else: return web.Response(text='Failed to move model', status=500) diff --git a/static/js/api/baseModelApi.js b/static/js/api/baseModelApi.js index 50a1af16..692a83db 100644 --- a/static/js/api/baseModelApi.js +++ b/static/js/api/baseModelApi.js @@ -515,7 +515,7 @@ class ModelApiClient { // Return new file path if move succeeded if (result.success) { - return targetPath; + return result.new_file_path; } return null; }