🐛 Fix leave channel api requires username
This commit is contained in:
parent
198583a7a3
commit
a8008c2c8c
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user