Skip to content

Commit

Permalink
Fix GetShips
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepijn98 committed Nov 12, 2019
1 parent 790e4ac commit e8e1dde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions golane.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (al AzurLane) GetShipByID(id string) (*structs.Ship, error) {
// GetShips returns a list of ships from rarity, type or affiliation
// order should be set using the "enum" Order, for example Order.TYPE
// value depends on what order is set too, for example if `Order.RARITY` is used value can be `Super Rare`
func (al AzurLane) GetShips(order order, value string) (*[]structs.SmallShip, error) {
func (al AzurLane) GetShips(order order, value string) ([]structs.SmallShip, error) {
url := fmt.Sprintf("%s/ships?orderBy=%s&%s=%s", baseURL, order, order, value)
bytes, err := get(url, al.UserAgent)
if err != nil {
Expand All @@ -114,7 +114,7 @@ func (al AzurLane) GetShips(order order, value string) (*[]structs.SmallShip, er

var response = new(structs.ShipsResponse)
json.Unmarshal(bytes, &response)
return &response.Ships, nil
return response.Ships, nil
}

// GetBuildInfo retuns info about a certain construction time
Expand Down

0 comments on commit e8e1dde

Please sign in to comment.