From 88e95d5c1f58bb501be5a174a5402a6d0cdc3d36 Mon Sep 17 00:00:00 2001 From: junfeng-li Date: Mon, 4 Mar 2024 21:48:32 +0000 Subject: [PATCH] Fix in_sync_controller endpoint respond decode err This is to remove the unnecessary routing based on request method in which the respond can't be decoded properly by the sm-api Test Plan: PASS: run system host-swact Task: 49661 Story: 2010676 Change-Id: Ife8862b7d5666de3a3dafff582dbb4c27e1adafa Signed-off-by: junfeng-li --- software/software/api/controllers/v1/software.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/software/software/api/controllers/v1/software.py b/software/software/api/controllers/v1/software.py index 119272ab..1861c8bf 100644 --- a/software/software/api/controllers/v1/software.py +++ b/software/software/api/controllers/v1/software.py @@ -23,10 +23,6 @@ LOG = log.getLogger(__name__) class SoftwareAPIController(object): - @expose(generic=True, template='json') - def index(self): - pass - @expose('json') def commit_patch(self, *args): try: @@ -244,6 +240,6 @@ class SoftwareAPIController(object): return dict(error=str(e)) return dict(data=query_hosts) - @index.when(method='GET', template='json') + @expose(method='GET', template='json') def in_sync_controller(self): return sc.in_sync_controller_api()