Skip to content

Commit 161c2ff

Browse files
committed
refactor: explicitly render HTML components using the Html wrapper from Elysia HTML plugin
1 parent 662af4b commit 161c2ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { authenticator } from 'otplib'
55
import QRCode from 'qrcode'
66
import { writeFile } from 'node:fs/promises'
77
import { readFileSync, existsSync } from 'node:fs'
8-
import { html } from '@elysiajs/html'
8+
import { html, Html } from '@elysiajs/html'
99

1010
// Import core modules
1111
import { createSessionManager } from './core/session.js'
@@ -138,7 +138,7 @@ export const r2Backup = initialConfig => app => {
138138
return
139139
}
140140

141-
return LoginPage({ totpEnabled: !!config.auth?.totpSecret })
141+
return Html(LoginPage({ totpEnabled: !!config.auth?.totpSecret }))
142142
})
143143

144144
// AUTH: Login Endpoint
@@ -452,7 +452,7 @@ export const r2Backup = initialConfig => app => {
452452
set.headers['Location'] = '/backup'
453453
return
454454
}
455-
return OnboardingPage({ sourceDir: config.sourceDir })
455+
return Html(OnboardingPage({ sourceDir: config.sourceDir }))
456456
})
457457

458458
// ONBOARDING: Save Initial Config
@@ -535,7 +535,7 @@ export const r2Backup = initialConfig => app => {
535535

536536
const jobStatus = scheduler.getStatus(config.cronEnabled)
537537
const hasAuth = !!(config.auth && config.auth.username && config.auth.password)
538-
return DashboardPage({ config, jobStatus, hasAuth })
538+
return Html(DashboardPage({ config, jobStatus, hasAuth }))
539539
})
540540
)
541541
})

0 commit comments

Comments
 (0)