debug
parent
ea4aa84a97
commit
8bbedaffde
|
|
@ -5,6 +5,7 @@ import (
|
|||
"api/database"
|
||||
"api/models"
|
||||
"api/utils"
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
|
@ -194,6 +195,8 @@ func Checkuser(c *fiber.Ctx) error {
|
|||
// Check if user exists
|
||||
database.DB.Where("email = ?", email).First(&user)
|
||||
|
||||
fmt.Printf("User Channel: [%s]\n", 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)
|
||||
|
|
@ -211,10 +214,10 @@ func Checkuser(c *fiber.Ctx) error {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// The user is found and it's a payable user; let's signalize this
|
||||
// The user is found and it's a pay user; let's signalize this
|
||||
if user.UserType == "U" {
|
||||
response.Type = "U"
|
||||
// If the user doesn't have a channel, it's a social user that needs to complete the registration
|
||||
// If the user doesn't have a channel, it's a pay user that needs to complete the registration
|
||||
if user.Channel == "" {
|
||||
response.Type = "RU"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue