mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 21:03:56 +01:00
parent
ade88a877d
commit
59f879bfec
1 changed files with 1 additions and 5 deletions
|
@ -129,11 +129,7 @@ func aesDecrypt(key, text []byte) ([]byte, error) {
|
|||
|
||||
// NewTwoFactor creates a new two-factor authentication token.
|
||||
func NewTwoFactor(t *TwoFactor) error {
|
||||
_, err := t.GenerateScratchToken()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = x.Insert(t)
|
||||
_, err := x.Insert(t)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue