sunrise-cms/handlers/admin-get/ntfyStartup.ts

20 lines
537 B
TypeScript

import type { Request, Response } from 'express'
import * as configFunctions from '../../helpers/functions.config.js'
export function handler(_request: Request, response: Response): void {
if (configFunctions.getProperty('application.ntfyStartup') === undefined) {
response.redirect(
configFunctions.getProperty('reverseProxy.urlPrefix') +
'/dashboard/?error=ntfyNotConfigured'
)
return
}
response.render('admin-ntfyStartup', {
headTitle: 'Ntfy Startup Notification'
})
}
export default handler