From 73f82ba6d807bcbbd68e4434b7de13c2313c9914 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 6 Feb 2023 11:45:06 -0500 Subject: [PATCH] wip Signed-off-by: Tiger Wang --- go.mod | 2 +- go.sum | 3 ++- route/v1.go | 2 -- route/v1/notify.go | 23 ----------------------- 4 files changed, 3 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 7581fe8..6f480fb 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-alpha2.0.20230206162644-6b60fd9fe992 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..77f82ae 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,8 @@ github.com/Curtis-Milo/nat-type-identifier-go v0.0.0-20220215191915-18d42168c63d 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-alpha2.0.20230206162644-6b60fd9fe992 h1:uSzi+vaqGqe1Nu9JYImZzsmEznol595Sbn4NHNjTWic= +github.com/IceWhaleTech/CasaOS-Common v0.4.2-alpha2.0.20230206162644-6b60fd9fe992/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= @@ -141,7 +143,6 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hirochachacha/go-smb2 v1.1.0 h1:b6hs9qKIql9eVXAiN0M2wSFY5xnhbHAQoCwRKbaRTZI= github.com/hirochachacha/go-smb2 v1.1.0/go.mod h1:8F1A4d5EZzrGu5R7PU163UcMRDJQl4FtcxjBfsY8TZE= 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)}) -}