Подготовить HY2XS к production-сборке
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"hy2xs-admin/model/vo"
|
||||
"hy2xs-admin/service"
|
||||
)
|
||||
|
||||
func MonitorSystem(c *gin.Context) {
|
||||
systemMonitorVo, err := service.MonitorSystem()
|
||||
if err != nil {
|
||||
vo.Fail(err.Error(), c)
|
||||
return
|
||||
}
|
||||
vo.Success(systemMonitorVo, c)
|
||||
}
|
||||
|
||||
func MonitorHysteria2(c *gin.Context) {
|
||||
hysteria2MonitorVo, err := service.MonitorHysteria2()
|
||||
if err != nil {
|
||||
vo.Fail(err.Error(), c)
|
||||
return
|
||||
}
|
||||
vo.Success(hysteria2MonitorVo, c)
|
||||
}
|
||||
Reference in New Issue
Block a user