mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Fix shadow declaration of err
This commit is contained in:
parent
863b5eba84
commit
9b52b83e1c
|
|
@ -24,13 +24,13 @@ func (a *UserInternalAPI) CreateSession(ctx context.Context, req *api.CreateSess
|
|||
s, err := a.ThreePidDB.GetSessionByThreePidAndSecret(ctx, req.ThreePid, req.ClientSecret)
|
||||
if err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
token, err := internal.GenerateBlob(tokenByteLength)
|
||||
if err != nil {
|
||||
return err
|
||||
token, errB := internal.GenerateBlob(tokenByteLength)
|
||||
if errB != nil {
|
||||
return errB
|
||||
}
|
||||
sid, err := internal.GenerateBlob(sessionIdByteLength)
|
||||
if err != nil {
|
||||
return err
|
||||
sid, errB := internal.GenerateBlob(sessionIdByteLength)
|
||||
if errB != nil {
|
||||
return errB
|
||||
}
|
||||
s = &api.Session{
|
||||
Sid: sid,
|
||||
|
|
|
|||
Loading…
Reference in a new issue