Skip to content

Commit 610b4bb

Browse files
committed
fix: query is optional for some endpoints (#10621)
* fix(monetization): `query` is optional * refactor: more defaults
1 parent 8469fb3 commit 610b4bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/src/api/monetization.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class MonetizationAPI {
3838
*/
3939
public async getSKUSubscriptions(
4040
skuId: Snowflake,
41-
query: RESTGetAPISKUSubscriptionsQuery,
41+
query: RESTGetAPISKUSubscriptionsQuery = {},
4242
{ signal }: Pick<RequestData, 'signal'> = {},
4343
) {
4444
return this.rest.get(Routes.skuSubscriptions(skuId), {
@@ -75,7 +75,7 @@ export class MonetizationAPI {
7575
*/
7676
public async getEntitlements(
7777
applicationId: Snowflake,
78-
query: RESTGetAPIEntitlementsQuery,
78+
query: RESTGetAPIEntitlementsQuery = {},
7979
{ signal }: Pick<RequestData, 'signal'> = {},
8080
) {
8181
return this.rest.get(Routes.entitlements(applicationId), {

packages/core/src/api/poll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class PollAPI {
2626
channelId: Snowflake,
2727
messageId: Snowflake,
2828
answerId: number,
29-
query: RESTGetAPIPollAnswerVotersQuery,
29+
query: RESTGetAPIPollAnswerVotersQuery = {},
3030
{ signal }: Pick<RequestData, 'signal'> = {},
3131
) {
3232
return this.rest.get(Routes.pollAnswerVoters(channelId, messageId, answerId), {

0 commit comments

Comments
 (0)