mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-09 09:50:09 +08:00
Pass context to DeleteUser and AuthenticateUser
This commit is contained in:
@@ -64,7 +64,7 @@ func (p Plugin) handleAuth(ctx context.Context, cmd []string, server utils.Serve
|
||||
if len(cmd) < 2 || len(cmd) > 3 {
|
||||
return nil, errors.New(utils.WRONG_ARGS_RESPONSE)
|
||||
}
|
||||
if err := p.acl.AuthenticateConnection(conn, cmd); err != nil {
|
||||
if err := p.acl.AuthenticateConnection(ctx, conn, cmd); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []byte(utils.OK_RESPONSE), nil
|
||||
@@ -240,7 +240,7 @@ func (p Plugin) handleDelUser(ctx context.Context, cmd []string, server utils.Se
|
||||
if len(cmd) < 3 {
|
||||
return nil, errors.New(utils.WRONG_ARGS_RESPONSE)
|
||||
}
|
||||
if err := p.acl.DeleteUser(cmd[2:]); err != nil {
|
||||
if err := p.acl.DeleteUser(ctx, cmd[2:]); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []byte(utils.OK_RESPONSE), nil
|
||||
|
Reference in New Issue
Block a user