From 43070cf76bac9a80380ebca14243d023f9d25090 Mon Sep 17 00:00:00 2001 From: Eli Yip Date: Tue, 3 Jun 2025 09:36:26 +0800 Subject: [PATCH] feat(legacy): implement interfaces handler --- api/legacy/handlers.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/legacy/handlers.go b/api/legacy/handlers.go index bbde2af..51da5cd 100644 --- a/api/legacy/handlers.go +++ b/api/legacy/handlers.go @@ -23,3 +23,16 @@ func (s *LegacyServer) handleHealth(c *gin.Context) { }, }) } + +// handleInterfaces 获取可用接口列表处理函数 +func (s *LegacyServer) handleInterfaces(c *gin.Context) { + responseData := map[string]any{ + "availableInterfaces": config.Config.AvailableInterfaces, + "defaultInterface": config.Config.DefaultInterface, + } + + c.JSON(http.StatusOK, define.ApiResponse{ + Status: "success", + Data: responseData, + }) +}