From a8008c2c8c92d31e934fca624da9d37a505291cd Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 26 Apr 2024 23:21:41 +0800 Subject: [PATCH] :bug: Fix leave channel api requires username --- pkg/server/channel_members_api.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/server/channel_members_api.go b/pkg/server/channel_members_api.go index 13ffd40..0efb3cf 100644 --- a/pkg/server/channel_members_api.go +++ b/pkg/server/channel_members_api.go @@ -128,14 +128,6 @@ func leaveChannel(c *fiber.Ctx) error { user := c.Locals("principal").(models.Account) alias := c.Params("channel") - var data struct { - AccountName string `json:"account_name" validate:"required"` - } - - if err := BindAndValidate(c, &data); err != nil { - return err - } - var channel models.Channel if err := database.C.Where(&models.Channel{ Alias: alias,