mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
refactor: replace api error handler with cosy err handler
This commit is contained in:
parent
4cb4695e7b
commit
b469ca7961
37 changed files with 268 additions and 250 deletions
|
@ -3,7 +3,6 @@ package cluster
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/0xJacky/Nginx-UI/api"
|
||||
analytic2 "github.com/0xJacky/Nginx-UI/internal/analytic"
|
||||
"github.com/0xJacky/Nginx-UI/internal/upgrader"
|
||||
"github.com/0xJacky/Nginx-UI/internal/version"
|
||||
|
@ -11,6 +10,7 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
"github.com/shirou/gopsutil/v4/cpu"
|
||||
"github.com/shirou/gopsutil/v4/disk"
|
||||
"github.com/uozi-tech/cosy"
|
||||
)
|
||||
|
||||
func GetCurrentNode(c *gin.Context) {
|
||||
|
@ -23,7 +23,7 @@ func GetCurrentNode(c *gin.Context) {
|
|||
|
||||
runtimeInfo, err := upgrader.GetRuntimeInfo()
|
||||
if err != nil {
|
||||
api.ErrHandler(c, err)
|
||||
cosy.ErrHandler(c, err)
|
||||
return
|
||||
}
|
||||
cpuInfo, _ := cpu.Info()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue