feat(legacy): implement interfaces handler

This commit is contained in:
Eli Yip 2025-06-03 09:36:26 +08:00
parent cc1de7c776
commit 43070cf76b
No known key found for this signature in database
GPG Key ID: C98B69D4CF7D7EC5

View File

@ -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,
})
}