🗑️ Remove realm preload to fix bugs

This commit is contained in:
2024-11-16 01:48:47 +08:00
parent ed73b40bf5
commit d9d6b81ac3
2 changed files with 6 additions and 6 deletions

View File

@ -206,7 +206,7 @@ func joinChannel(c *fiber.Ctx) error {
var channel models.Channel
if err := database.C.Where(&models.Channel{
Alias: alias,
}).Preload("Realm").First(&channel).Error; err != nil {
}).First(&channel).Error; err != nil {
return fiber.NewError(fiber.StatusNotFound, err.Error())
} else if _, _, err := services.GetAvailableChannel(channel.ID, user); err == nil {
return fiber.NewError(fiber.StatusBadRequest, "you already joined the channel")