main
Nilo Roberto C Paim 2024-05-30 09:00:11 -03:00
parent 2571b43e10
commit ffddfc4552
1 changed files with 1 additions and 2 deletions

View File

@ -194,8 +194,6 @@ func Checkuser(c *fiber.Ctx) error {
// Check if user exists
database.DB.Where("email = ?", email).First(&user)
log.Printf("User Channel: [%s], size=%d\n", user.Channel, len(user.Channel))
if user.ID == 0 {
// The user is not found; let's check if it's a test user
database.DB.Where("email = ?", email).First(&usertest)
@ -218,6 +216,7 @@ func Checkuser(c *fiber.Ctx) error {
response.Type = "U"
// If the user doesn't have a channel, it's a pay user that needs to complete the registration
if len(user.Channel) == 0 {
log.Printf("User Channel: [%s], size=%d\n", user.Channel, len(user.Channel))
response.Type = "RU"
}
}