updated slapapi
This commit is contained in:
@@ -2,7 +2,6 @@ package slapshotapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -54,9 +53,11 @@ func (c *SlapAPI) GetQueueStatus(
|
||||
endpoint := getEndpointMatchmaking(regions)
|
||||
data, err := c.request(ctx, endpoint)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "slapapiReq")
|
||||
return nil, errors.Wrap(err, "c.request")
|
||||
}
|
||||
resp, err := unmarshal[matchmakingresp](data)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "unmarshal")
|
||||
}
|
||||
resp := matchmakingresp{}
|
||||
json.Unmarshal(data, &resp)
|
||||
return &resp.Playlists, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user