2024-07-19 19:04:11 +08:00
|
|
|
package router
|
|
|
|
|
|
|
|
import (
|
2024-08-07 13:52:34 +08:00
|
|
|
v2 "github.com/1Panel-dev/1Panel/core/app/api/v2"
|
2024-07-19 19:04:11 +08:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
type SettingRouter struct{}
|
|
|
|
|
|
|
|
func (s *SettingRouter) InitRouter(Router *gin.RouterGroup) {
|
2024-07-25 18:13:57 +08:00
|
|
|
settingRouter := Router.Group("settings")
|
2024-08-07 13:52:34 +08:00
|
|
|
baseApi := v2.ApiGroupApp.BaseApi
|
2024-07-19 19:04:11 +08:00
|
|
|
{
|
2024-07-25 18:13:57 +08:00
|
|
|
settingRouter.POST("/search", baseApi.GetSettingInfo)
|
|
|
|
settingRouter.POST("/expired/handle", baseApi.HandlePasswordExpired)
|
2024-07-19 19:04:11 +08:00
|
|
|
settingRouter.GET("/search/available", baseApi.GetSystemAvailable)
|
|
|
|
settingRouter.POST("/update", baseApi.UpdateSetting)
|
|
|
|
settingRouter.GET("/interface", baseApi.LoadInterfaceAddr)
|
|
|
|
settingRouter.POST("/menu/update", baseApi.UpdateMenu)
|
|
|
|
settingRouter.POST("/proxy/update", baseApi.UpdateProxy)
|
|
|
|
settingRouter.POST("/bind/update", baseApi.UpdateBindInfo)
|
|
|
|
settingRouter.POST("/port/update", baseApi.UpdatePort)
|
|
|
|
settingRouter.POST("/ssl/update", baseApi.UpdateSSL)
|
|
|
|
settingRouter.GET("/ssl/info", baseApi.LoadFromCert)
|
|
|
|
settingRouter.POST("/ssl/download", baseApi.DownloadSSL)
|
|
|
|
settingRouter.POST("/password/update", baseApi.UpdatePassword)
|
|
|
|
settingRouter.POST("/mfa", baseApi.LoadMFA)
|
|
|
|
settingRouter.POST("/mfa/bind", baseApi.MFABind)
|
|
|
|
|
|
|
|
settingRouter.POST("/upgrade", baseApi.Upgrade)
|
|
|
|
settingRouter.POST("/upgrade/notes", baseApi.GetNotesByVersion)
|
|
|
|
settingRouter.GET("/upgrade", baseApi.GetUpgradeInfo)
|
|
|
|
}
|
|
|
|
}
|