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)
|
s, err := a.ThreePidDB.GetSessionByThreePidAndSecret(ctx, req.ThreePid, req.ClientSecret)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
token, err := internal.GenerateBlob(tokenByteLength)
|
token, errB := internal.GenerateBlob(tokenByteLength)
|
||||||
if err != nil {
|
if errB != nil {
|
||||||
return err
|
return errB
|
||||||
}
|
}
|
||||||
sid, err := internal.GenerateBlob(sessionIdByteLength)
|
sid, errB := internal.GenerateBlob(sessionIdByteLength)
|
||||||
if err != nil {
|
if errB != nil {
|
||||||
return err
|
return errB
|
||||||
}
|
}
|
||||||
s = &api.Session{
|
s = &api.Session{
|
||||||
Sid: sid,
|
Sid: sid,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue