swap out context access for account (#1589)

This commit is contained in:
Asim Aslam
2020-04-28 17:35:18 +01:00
committed by GitHub
parent 9bb1904a38
commit f908110fb6
2 changed files with 8 additions and 32 deletions

View File

@@ -178,10 +178,7 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
}
// There is an account, set it in the context
ctx, err = auth.ContextWithAccount(ctx, account)
if err != nil {
return err
}
ctx = auth.ContextWithAccount(ctx, account)
// The user is authorised, allow the call
return h(ctx, req, rsp)