Skip to content

Commit

Permalink
Merge pull request #59 from GW2Treasures/fix/unauthorized-endpoints-a…
Browse files Browse the repository at this point in the history
…ccess-token

Fix `/v2/guild/upgrades` being matched as `/v2/guild/:id/`
  • Loading branch information
darthmaim authored Jul 24, 2024
2 parents 4212328 + 5243ec5 commit 573d401
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-waves-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gw2api/types": patch
---

Fix `/v2/guild/upgrades` being matched as `/v2/guild/:id/`
1 change: 1 addition & 0 deletions packages/types/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ export type AuthenticatedOptions = {
}

export type OptionsByEndpoint<Endpoint extends string> =
Endpoint extends BulkExpandedEndpointUrl<KnownBulkExpandedEndpoint & KnownUnauthorizedEndpoint & KnownLocalizedEndpoint, string | number> ? Options & LocalizedOptions :
Endpoint extends BulkExpandedEndpointUrl<KnownBulkExpandedEndpoint & KnownAuthenticatedEndpoint & KnownLocalizedEndpoint, string | number> ? Options & AuthenticatedOptions & LocalizedOptions :
Endpoint extends BulkExpandedEndpointUrl<KnownBulkExpandedEndpoint & KnownLocalizedEndpoint, string | number> ? Options & LocalizedOptions :
Endpoint extends BulkExpandedEndpointUrl<KnownBulkExpandedEndpoint & KnownAuthenticatedEndpoint, string | number> ? Options & AuthenticatedOptions :
Expand Down

0 comments on commit 573d401

Please sign in to comment.