🐛 Fix wrong perm check of channel member
This commit is contained in:
parent
fabda61822
commit
65cb542985
@ -134,8 +134,7 @@ func removeChannelMember(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
var channel models.Channel
|
var channel models.Channel
|
||||||
if err := database.C.Where(&models.Channel{
|
if err := database.C.Where(&models.Channel{
|
||||||
Alias: alias,
|
Alias: alias,
|
||||||
AccountID: user.ID,
|
|
||||||
}).First(&channel).Error; err != nil {
|
}).First(&channel).Error; err != nil {
|
||||||
return fiber.NewError(fiber.StatusNotFound, err.Error())
|
return fiber.NewError(fiber.StatusNotFound, err.Error())
|
||||||
} else if channel.Type == models.ChannelTypeDirect {
|
} else if channel.Type == models.ChannelTypeDirect {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user