Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 6229338

Browse files
deepsource-autofix[bot]DanSnow
authored andcommitted
refactor: replace template strings with regular string literals
Template literals are useful when you need: 1. [Interpolated strings](https://en.wikipedia.org/wiki/String_interpolation).
1 parent 7eaac13 commit 6229338

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

packages/karbon/src/module.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -334,37 +334,37 @@ const karbon = defineNuxtModule<ModuleOptions>({
334334
})
335335

336336
addServerHandler({
337-
route: `/api/_sitemap-urls`,
338-
handler: await resolver.resolve(`./runtime/routes/api/_sitemap-urls`),
337+
route: "/api/_sitemap-urls",
338+
handler: await resolver.resolve("./runtime/routes/api/_sitemap-urls"),
339339
})
340340

341341
// Global custom field
342342
addServerHandler({
343-
route: `/_storipress/_custom-field.js`,
344-
handler: await resolver.resolve(`./runtime/routes/custom-field`),
343+
route: "/_storipress/_custom-field.js",
344+
handler: await resolver.resolve("./runtime/routes/custom-field"),
345345
})
346346
addServerHandler({
347-
route: `/_storipress/_custom-field.json`,
348-
handler: await resolver.resolve(`./runtime/routes/custom-field`),
347+
route: "/_storipress/_custom-field.json",
348+
handler: await resolver.resolve("./runtime/routes/custom-field"),
349349
})
350350

351351
addServerHandler({
352-
route: `/_storipress/_snapshot`,
353-
handler: await resolver.resolve(`./runtime/routes/_snapshot`),
352+
route: "/_storipress/_snapshot",
353+
handler: await resolver.resolve("./runtime/routes/_snapshot"),
354354
})
355355

356356
if (paywall.enable) {
357357
addServerHandler({
358-
route: `/api/decrypt-key`,
359-
handler: await resolver.resolve(`./runtime/routes/api/decrypt-key`),
358+
route: "/api/decrypt-key",
359+
handler: await resolver.resolve("./runtime/routes/api/decrypt-key"),
360360
})
361361
}
362362

363-
addStaticRoute({ route: '/_storipress/_site', handler: resolver.resolve(`./runtime/routes/meta/site`), fullStatic })
363+
addStaticRoute({ route: '/_storipress/_site', handler: resolver.resolve("./runtime/routes/meta/site"), fullStatic })
364364

365365
addStaticRoute({
366366
route: '/_storipress/_custom-field-group',
367-
handler: resolver.resolve(`./runtime/routes/custom-field-group`),
367+
handler: resolver.resolve("./runtime/routes/custom-field-group"),
368368
fullStatic,
369369
})
370370

packages/karbon/src/runtime/routes/_snapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default defineCachedEventHandler(async (event: H3Event) => {
4141

4242
const nitro = useNitroApp()
4343
const links: string[] = []
44-
const groupsResponse = await nitro.localFetch(`/_storipress/_custom-field-group.json`, {
44+
const groupsResponse = await nitro.localFetch("/_storipress/_custom-field-group.json", {
4545
method: 'GET',
4646
})
4747
const groups: Record<string, string[]> = await groupsResponse.json()

0 commit comments

Comments
 (0)