mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-10 22:36:58 +08:00
Add public routes for supported models and exchanges (#554)
This commit is contained in:
@@ -77,6 +77,10 @@ func (s *Server) setupRoutes() {
|
|||||||
// 管理员登录(管理员模式下使用,公共)
|
// 管理员登录(管理员模式下使用,公共)
|
||||||
api.POST("/admin-login", s.handleAdminLogin)
|
api.POST("/admin-login", s.handleAdminLogin)
|
||||||
|
|
||||||
|
// 系统支持的模型和交易所(无需认证)
|
||||||
|
api.GET("/supported-models", s.handleGetSupportedModels)
|
||||||
|
api.GET("/supported-exchanges", s.handleGetSupportedExchanges)
|
||||||
|
|
||||||
// 非管理员模式下的公开认证路由
|
// 非管理员模式下的公开认证路由
|
||||||
if !auth.IsAdminMode() {
|
if !auth.IsAdminMode() {
|
||||||
// 认证相关路由(无需认证)
|
// 认证相关路由(无需认证)
|
||||||
@@ -85,9 +89,6 @@ func (s *Server) setupRoutes() {
|
|||||||
api.POST("/verify-otp", s.handleVerifyOTP)
|
api.POST("/verify-otp", s.handleVerifyOTP)
|
||||||
api.POST("/complete-registration", s.handleCompleteRegistration)
|
api.POST("/complete-registration", s.handleCompleteRegistration)
|
||||||
|
|
||||||
// 系统支持的模型和交易所(无需认证)
|
|
||||||
api.GET("/supported-models", s.handleGetSupportedModels)
|
|
||||||
api.GET("/supported-exchanges", s.handleGetSupportedExchanges)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 系统配置(无需认证,用于前端判断是否管理员模式/注册是否开启)
|
// 系统配置(无需认证,用于前端判断是否管理员模式/注册是否开启)
|
||||||
|
|||||||
Reference in New Issue
Block a user