Skip to content

Commit c4181da

Browse files
committed
W-21354832: lint fix
1 parent ddb8947 commit c4181da

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

packages/pwa-kit-create-app/assets/bootstrap/js/overrides/app/pages/home/index.jsx.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Home = () => {
5454
if (res) {
5555
res.set(
5656
'Cache-Control',
57-
`s-maxage=${MAX_CACHE_AGE}, stale-while-revalidate={STALE_WHILE_REVALIDATE}`
57+
`s-maxage=${MAX_CACHE_AGE}, stale-while-revalidate=${STALE_WHILE_REVALIDATE}`
5858
)
5959
}
6060

packages/pwa-kit-create-app/assets/bootstrap/js/overrides/app/ssr.js.hbs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,19 +467,21 @@ const {handler} = runtime.createHandler(options, (app) => {
467467
}
468468
return data
469469
}
470-
470+
471471
// Helper function to fetch payment metadata from the Commerce Cloud instance
472472
app.get('/api/payment-metadata', async (req, res) => {
473473
try {
474474
const response = await fetch(config.app.sfPayments.metadataUrl, {
475-
headers: { Accept: 'application/json' }
475+
headers: {Accept: 'application/json'}
476476
})
477477
if (!response.ok) {
478478
throw new Error(`Metadata request failed with status: ${response.status}`)
479479
}
480480
const data = await response.json()
481-
const transformedData = transformIconPaths(data, new URL(config.app.sfPayments.metadataUrl).hostname)
482-
res.setHeader('Access-Control-Allow-Origin', '*')
481+
const transformedData = transformIconPaths(
482+
data,
483+
new URL(config.app.sfPayments.metadataUrl).hostname
484+
)
483485
res.setHeader('Content-Type', 'application/json')
484486
res.json(transformedData)
485487
} catch (error) {

packages/pwa-kit-create-app/assets/templates/@salesforce/retail-react-app/app/ssr.js.hbs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,19 +467,21 @@ const {handler} = runtime.createHandler(options, (app) => {
467467
}
468468
return data
469469
}
470-
470+
471471
// Helper function to fetch payment metadata from the Commerce Cloud instance
472472
app.get('/api/payment-metadata', async (req, res) => {
473473
try {
474474
const response = await fetch(config.app.sfPayments.metadataUrl, {
475-
headers: { Accept: 'application/json' }
475+
headers: {Accept: 'application/json'}
476476
})
477477
if (!response.ok) {
478478
throw new Error(`Metadata request failed with status: ${response.status}`)
479479
}
480480
const data = await response.json()
481-
const transformedData = transformIconPaths(data, new URL(config.app.sfPayments.metadataUrl).hostname)
482-
res.setHeader('Access-Control-Allow-Origin', '*')
481+
const transformedData = transformIconPaths(
482+
data,
483+
new URL(config.app.sfPayments.metadataUrl).hostname
484+
)
483485
res.setHeader('Content-Type', 'application/json')
484486
res.json(transformedData)
485487
} catch (error) {

0 commit comments

Comments
 (0)