|
|
@ -7,6 +7,7 @@ import ( |
|
|
|
"git.aiterp.net/lucifer3/server/events" |
|
|
|
"git.aiterp.net/lucifer3/server/services/uistate" |
|
|
|
"github.com/labstack/echo/v4" |
|
|
|
"github.com/labstack/echo/v4/middleware" |
|
|
|
"log" |
|
|
|
"net" |
|
|
|
"sync" |
|
|
@ -18,6 +19,7 @@ func New(addr string) (lucifer3.Service, error) { |
|
|
|
e := echo.New() |
|
|
|
e.HideBanner = true |
|
|
|
e.HidePort = true |
|
|
|
e.Use(middleware.CORS()) |
|
|
|
|
|
|
|
e.GET("/state", func(c echo.Context) error { |
|
|
|
svc.mu.Lock() |
|
|
|