Skip to content

Commit

Permalink
refactor: move variable declarations inside createDashboardHandler fu…
Browse files Browse the repository at this point in the history
…nction
  • Loading branch information
productdevbook committed Dec 5, 2024
1 parent 69c2f8e commit e65d1a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/handlers/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'

const __dirname = fileURLToPath(new URL('.', import.meta.url))
const template = readFileSync(resolve(__dirname, '../templates/dashboard.html'), 'utf-8')

export function createDashboardHandler() {
const __dirname = fileURLToPath(new URL('.', import.meta.url))
const template = readFileSync(resolve(__dirname, '../templates/dashboard.html'), 'utf-8')

return async () => {
return template
}
Expand Down

0 comments on commit e65d1a4

Please sign in to comment.