diff --git a/backend/route_registry.py b/backend/route_registry.py index 37c4deb..8290a9d 100644 --- a/backend/route_registry.py +++ b/backend/route_registry.py @@ -101,6 +101,7 @@ ROUTES: tuple[RouteSpec, ...] = ( ), RouteSpec("POST", "profiles/{profile_id}/wardrobe/match", "backend.routes.wardrobe_routes.match_wardrobe", "read"), RouteSpec("POST", "integrations/private-companion/daily-outfit", "backend.routes.integration_routes.private_companion_daily_outfit", "read"), + RouteSpec("GET", "integrations/logs", "backend.routes.integration_routes.list_integration_logs", "read"), RouteSpec("GET", "logs/generation", "backend.routes.log_routes.get_generation_logs", "read"), RouteSpec("GET", "logs/workflows", "backend.routes.log_routes.get_workflow_logs", "read"), RouteSpec("GET", "logs/errors", "backend.routes.log_routes.get_error_logs", "read"), diff --git a/backend/services/quick_profile_service.py b/backend/services/quick_profile_service.py index 6bea262..96155fd 100644 --- a/backend/services/quick_profile_service.py +++ b/backend/services/quick_profile_service.py @@ -18,14 +18,14 @@ class QuickProfileService: if not isinstance(questionnaire, dict): raise ApiError( ErrorCode.VALIDATION_FAILED, - "缺少快速人设问卷", + "\u7f3a\u5c11\u5feb\u901f\u4eba\u8bbe\u95ee\u5377", {"field": "questionnaire"}, ) name = str(questionnaire.get("name") or "").strip() if not name: raise ApiError( ErrorCode.VALIDATION_FAILED, - "角色名称不能为空", + "\u89d2\u8272\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a", {"field": "questionnaire.name"}, ) diff --git a/tests/test_route_registry.py b/tests/test_route_registry.py index d5882fd..5d8da17 100644 --- a/tests/test_route_registry.py +++ b/tests/test_route_registry.py @@ -19,6 +19,7 @@ class RouteRegistryTests(unittest.TestCase): self.assertIn(("PUT", "material-categories/{category_id}"), keys) self.assertIn(("GET", "materials/{material_id}"), keys) self.assertIn(("DELETE", "profiles/{profile_id}/wardrobe/{wardrobe_item_id}"), keys) + self.assertIn(("GET", "integrations/logs"), keys) self.assertEqual(len(routes), len(ROUTES)) def test_webui_adapter_manifest_includes_api_routes(self):