minor cleanup
This commit is contained in:
parent
de8c0dce99
commit
1b387f75e3
|
@ -56,9 +56,9 @@ func (b *backend) readConfigAccess(storage logical.Storage) (*accessConfig, erro
|
|||
|
||||
func (b *backend) pathConfigAccessRead(
|
||||
req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
|
||||
conf, intErr := b.readConfigAccess(req.Storage)
|
||||
if intErr != nil {
|
||||
return nil, intErr
|
||||
conf, err := b.readConfigAccess(req.Storage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if conf == nil {
|
||||
return nil, fmt.Errorf("no user or internal error reported but nomad access configuration not found")
|
||||
|
|
|
@ -39,13 +39,13 @@ func (b *backend) secretTokenRenew(
|
|||
|
||||
func (b *backend) secretTokenRevoke(
|
||||
req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
|
||||
c, intErr := b.client(req.Storage)
|
||||
if intErr != nil {
|
||||
return nil, intErr
|
||||
c, err := b.client(req.Storage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tokenRaw := req.Secret.InternalData["accessor_id"]
|
||||
_, err := c.ACLTokens().Delete(tokenRaw.(string), nil)
|
||||
_, err = c.ACLTokens().Delete(tokenRaw.(string), nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue