set Code when inserting
parent
c43adc49fb
commit
b789865943
|
@ -32,7 +32,9 @@ func (i *Invite) Insert(db *sql.DB) error {
|
||||||
return err
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue