set Code when inserting

trunk
vilmibm 2023-03-09 06:39:20 +00:00
parent c43adc49fb
commit b789865943
1 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,9 @@ func (i *Invite) Insert(db *sql.DB) error {
return err
}
_, err = stmt.Exec(generateCode(i.Email), i.Email)
i.Code = generateCode(i.Email)
_, err = stmt.Exec(i.Code, i.Email)
if err != nil {
return err
}