diff --git a/go.mod b/go.mod index 7581fe8..98a22cc 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/Curtis-Milo/nat-type-identifier-go v0.0.0-20220215191915-18d42168c63d - github.com/IceWhaleTech/CasaOS-Common v0.4.2-alpha1 + github.com/IceWhaleTech/CasaOS-Common v0.4.2-alpha3 github.com/Xhofe/go-cache v0.0.0-20220723083548-714439c8af9a github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/deckarep/golang-set/v2 v2.1.0 diff --git a/go.sum b/go.sum index 372f869..656f581 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= github.com/Curtis-Milo/nat-type-identifier-go v0.0.0-20220215191915-18d42168c63d h1:62lEBImTxZ83pgzywgDNIrPPuQ+j4ep9QjqrWBn1hrU= github.com/Curtis-Milo/nat-type-identifier-go v0.0.0-20220215191915-18d42168c63d/go.mod h1:lW9x+yEjqKdPbE3+cf2fGPJXCw/hChX3Omi9QHTLFsQ= -github.com/IceWhaleTech/CasaOS-Common v0.4.2-alpha1 h1:4Z61swpEC/OUGLlzww1v/D916j7yqYnfBevdVD/dgjI= -github.com/IceWhaleTech/CasaOS-Common v0.4.2-alpha1/go.mod h1:xcemiRsXcs1zrmQxYMyExDjZ7UHYwkJqYE71IDIV0xA= +github.com/IceWhaleTech/CasaOS-Common v0.4.2-alpha3 h1:WJUYo+hJpLmza7mQngoJVeUJOfnrZevNrX5wzTuOJo0= +github.com/IceWhaleTech/CasaOS-Common v0.4.2-alpha3/go.mod h1:xcemiRsXcs1zrmQxYMyExDjZ7UHYwkJqYE71IDIV0xA= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/Xhofe/go-cache v0.0.0-20220723083548-714439c8af9a h1:RenIAa2q4H8UcS/cqmwdT1WCWIAH5aumP8m8RpbqVsE= github.com/Xhofe/go-cache v0.0.0-20220723083548-714439c8af9a/go.mod h1:sSBbaOg90XwWKtpT56kVujF0bIeVITnPlssLclogS04= diff --git a/route/v1.go b/route/v1.go index 3fce100..27246b9 100644 --- a/route/v1.go +++ b/route/v1.go @@ -155,8 +155,6 @@ func InitV1Router() *gin.Engine { v1NotifyGroup.POST("/:path", v1.PostNotifyMessage) // merge to system v1NotifyGroup.POST("/system_status", v1.PostSystemStatusNotify) - //v1NotifyGroup.POST("/install_app", v1.PostInstallAppNotify) - //v1NotifyGroup.POST("/uninstall_app", v1.PostUninstallAppNotify) } } diff --git a/route/v1/notify.go b/route/v1/notify.go index 0f7de77..027fcd7 100644 --- a/route/v1/notify.go +++ b/route/v1/notify.go @@ -3,7 +3,6 @@ package v1 import ( "net/http" - "github.com/IceWhaleTech/CasaOS-Common/model/notify" "github.com/IceWhaleTech/CasaOS/model" "github.com/IceWhaleTech/CasaOS/pkg/utils/common_err" "github.com/IceWhaleTech/CasaOS/service" @@ -32,25 +31,3 @@ func PostSystemStatusNotify(c *gin.Context) { service.MyService.Notify().SettingSystemTempData(message) c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) } - -func PostInstallAppNotify(c *gin.Context) { - app := notify.Application{} - if err := c.ShouldBind(&app); err != nil { - c.JSON(http.StatusBadRequest, model.Result{Success: common_err.INVALID_PARAMS, Message: err.Error()}) - return - } - - //service.MyService.Notify().SendInstallAppBySocket(app) - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) -} - -func PostUninstallAppNotify(c *gin.Context) { - app := notify.Application{} - if err := c.ShouldBind(&app); err != nil { - c.JSON(http.StatusBadRequest, model.Result{Success: common_err.INVALID_PARAMS, Message: err.Error()}) - return - } - - //service.MyService.Notify().SendUninstallAppBySocket(app) - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) -}