forked from nixcn/nixcn-cms
Mod event and user table, add event CURD
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -82,18 +82,8 @@ func VerifyMagicLink(c *gin.Context) {
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
// Create user
|
||||
newUUID, err := uuid.NewUUID()
|
||||
if err != nil {
|
||||
c.JSON(500, gin.H{"status": "internal server error"})
|
||||
return
|
||||
}
|
||||
newUserId, err := uuid.NewUUID()
|
||||
if err != nil {
|
||||
c.JSON(500, gin.H{"status": "internal server error"})
|
||||
return
|
||||
}
|
||||
user.UUID = newUUID
|
||||
user.UserId = newUserId
|
||||
user.UUID = uuid.New()
|
||||
user.UserId = uuid.New()
|
||||
user.Email = email
|
||||
user.Type = "Normal"
|
||||
user.PermissionLevel = 10
|
||||
|
||||
Reference in New Issue
Block a user