updated slapapi
This commit is contained in:
@@ -2,7 +2,6 @@ package slapshotapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@@ -46,10 +45,9 @@ func (c *SlapAPI) GetSlapID(
|
||||
}
|
||||
return 0, errors.Wrap(err, "c.request")
|
||||
}
|
||||
resp := idresp{}
|
||||
err = json.Unmarshal(data, &resp)
|
||||
resp, err := unmarshal[idresp](data)
|
||||
if err != nil {
|
||||
return 0, errors.Wrap(err, "json.Unmarshal")
|
||||
return 0, errors.Wrap(err, "unmarshal")
|
||||
}
|
||||
return resp.ID, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user