Skip to content

Commit

Permalink
fix(CDNRoutes): fix store page wrong extension (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza authored Jan 31, 2024
1 parent 71caf7c commit 6f541d5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions deno/rest/v10/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,8 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1188,6 +1188,7 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
Expand Down
5 changes: 3 additions & 2 deletions deno/rest/v9/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,8 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1196,6 +1196,7 @@ export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
Expand Down
5 changes: 3 additions & 2 deletions rest/v10/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,8 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1188,6 +1188,7 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
Expand Down
5 changes: 3 additions & 2 deletions rest/v9/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,8 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1196,6 +1196,7 @@ export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
Expand Down

0 comments on commit 6f541d5

Please sign in to comment.