Skip to content

Commit

Permalink
Merge pull request #157 from vtex-apps/bugfix/generate-product-routes
Browse files Browse the repository at this point in the history
Fix: KI #827104 - Sitemap isn't being generated/updated
  • Loading branch information
vsseixaso authored Jul 9, 2024
2 parents baee178 + fa6f015 commit 5e96b9f
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 130 deletions.
1 change: 1 addition & 0 deletions node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const clients: ClientsConfig<Clients> = {
},
vbase: {
memoryCache: vbaseCacheStorage,
retries: 3,
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
RequestConfig,
Tenant,
TenantClient,
VBase
VBase,
VBaseSaveResponse
} from '@vtex/api'
import * as TypeMoq from 'typemoq'

Expand Down Expand Up @@ -50,11 +51,12 @@ describe('Test rewriter routes generation', () => {
bucket: string,
file: string,
data: T
): Promise<void> => {
): Promise<VBaseSaveResponse> => {
if (!this.jsonData[bucket]) {
this.jsonData[bucket] = {}
}
this.jsonData[bucket][file] = data
return ({ etag: 'etag' } as unknown) as VBaseSaveResponse
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
RequestTracingConfig,
Tenant,
TenantClient,
VBase
VBase,
VBaseSaveResponse
} from '@vtex/api'
import { Product } from '@vtex/api/lib/clients/apps/catalogGraphQL/product'
import * as TypeMoq from 'typemoq'
Expand Down Expand Up @@ -95,11 +96,12 @@ describe('Test product routes generation', () => {
bucket: string,
file: string,
data: T
): Promise<void> => {
): Promise<VBaseSaveResponse> => {
if (!this.jsonData[bucket]) {
this.jsonData[bucket] = {}
}
this.jsonData[bucket][file] = data
return Promise.resolve({}) as Promise<VBaseSaveResponse>
}
}

Expand Down
Loading

0 comments on commit 5e96b9f

Please sign in to comment.