feat: 添加版本和构建时间变量 fix: 修正短信队列类型注释错误 style: 清理未使用的代码和测试文件 docs: 更新安装文档中的下载链接 chore: 迁移数据库脚本添加日志和订阅配置
27 lines
698 B
Go
27 lines
698 B
Go
package user
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/perfect-panel/server/internal/logic/public/user"
|
|
"github.com/perfect-panel/server/internal/svc"
|
|
"github.com/perfect-panel/server/internal/types"
|
|
"github.com/perfect-panel/server/pkg/result"
|
|
)
|
|
|
|
// Unbind Device
|
|
func UnbindDeviceHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
|
return func(c *gin.Context) {
|
|
var req types.UnbindDeviceRequest
|
|
_ = c.ShouldBind(&req)
|
|
validateErr := svcCtx.Validate(&req)
|
|
if validateErr != nil {
|
|
result.ParamErrorResult(c, validateErr)
|
|
return
|
|
}
|
|
|
|
l := user.NewUnbindDeviceLogic(c.Request.Context(), svcCtx)
|
|
err := l.UnbindDevice(&req)
|
|
result.HttpResult(c, nil, err)
|
|
}
|
|
}
|