automatic insertion of test user
parent
c373a34578
commit
788196cc3e
|
|
@ -221,6 +221,14 @@ func Checkuser(c *fiber.Ctx) error {
|
|||
if user.ID == 0 {
|
||||
// The user is not found, so it's an eligible tester; let's signalize this
|
||||
response.Type = "T"
|
||||
|
||||
// Insert the user in the database
|
||||
u := models.User{
|
||||
Email: email,
|
||||
UserType: "T",
|
||||
TestStatus: "TS", // Awaiting test done
|
||||
}
|
||||
database.DB.Create(&u)
|
||||
} else {
|
||||
// The user is found and it's an admin; let's signalize this
|
||||
if user.UserType == "A" {
|
||||
|
|
|
|||
Loading…
Reference in New Issue