七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
This commit is contained in:
@@ -77,6 +77,24 @@ func (h *AccountHandler) Update(c *fiber.Ctx) error {
|
||||
return response.Success(c, account)
|
||||
}
|
||||
|
||||
// BindWeCom 绑定账号与企业微信应用可见成员。
|
||||
// PUT /api/admin/accounts/:id/wecom-binding
|
||||
func (h *AccountHandler) BindWeCom(c *fiber.Ctx) error {
|
||||
id, err := strconv.ParseUint(c.Params("id"), 10, 64)
|
||||
if err != nil || id == 0 {
|
||||
return errors.New(errors.CodeInvalidParam, "无效的账号 ID")
|
||||
}
|
||||
var request dto.BindAccountWeComRequest
|
||||
if err := c.BodyParser(&request); err != nil {
|
||||
return errors.New(errors.CodeInvalidParam)
|
||||
}
|
||||
result, err := h.service.BindWeCom(c.UserContext(), uint(id), request)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return response.Success(c, result)
|
||||
}
|
||||
|
||||
// Delete 删除账号
|
||||
// DELETE /api/admin/accounts/:id
|
||||
func (h *AccountHandler) Delete(c *fiber.Ctx) error {
|
||||
|
||||
Reference in New Issue
Block a user