Skip to content

Commit

Permalink
[refactoring] #48
Browse files Browse the repository at this point in the history
  • Loading branch information
yoneyan committed Mar 1, 2021
1 parent b58139d commit 7ac75b6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions pkg/api/core/user/v0/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,19 @@ func Add(c *gin.Context) {
log.Println("Email: " + input.Email)
log.Println("tmp_Pass: " + pass)

data = user.User{GroupID: input.GroupID, Name: input.Name, NameEn: input.NameEn,
Email: input.Email, Pass: strings.ToLower(hash.Generate(pass)), GroupHandle: input.GroupHandle,
Status: 0, Tech: input.Tech, Level: input.Level, MailVerify: &[]bool{false}[0], MailToken: mailToken}
data = user.User{
GroupID: input.GroupID,
Name: input.Name,
NameEn: input.NameEn,
Email: input.Email,
Pass: strings.ToLower(hash.Generate(pass)),
GroupHandle: input.GroupHandle,
Status: 0,
Tech: input.Tech,
Level: input.Level,
MailVerify: &[]bool{false}[0],
MailToken: mailToken,
}
}

//check exist for database
Expand Down

0 comments on commit 7ac75b6

Please sign in to comment.