completed user type

main
Nilo Roberto C Paim 2024-05-27 18:53:01 -03:00
parent ede08cee1f
commit ea4aa84a97
1 changed files with 23 additions and 15 deletions

View File

@ -211,25 +211,33 @@ func Checkuser(c *fiber.Ctx) error {
}
}
} else {
// The user is found; let's signalize this
response.Type = "U" // At first sight it's a user
// The user is found and it's a payable 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 user.Channel == "" {
response.Type = "RU"
}
}
// TODO: Verify the user's type (Admin, User, Social, etc.)
// The user is found and it's a social; let's signalize this
if user.UserType == "S" {
response.Type = "S"
// If the user doesn't have a channel, it's a social user that needs to complete the registration
if user.Channel == "" {
response.Type = "SR"
}
}
if user.Channel == "" {
// User needs to complete the registration
response.Type = "RU"
if user.Blocked == "S" {
// User is blocked
response.Type = "UB"
} else {
if user.Blocked == "S" {
// User is blocked
response.Type = "UB"
if user.Cancelled == "S" {
// User is cancelled
response.Type = "UC"
} else {
if user.Cancelled == "S" {
// User is cancelled
response.Type = "UC"
} else {
response.Type = user.UserType
}
response.Type = user.UserType
}
}
}