11 lines
236 B
TypeScript
11 lines
236 B
TypeScript
|
|
export default defineEventHandler(async (event) => {
|
||
|
|
const config = useRuntimeConfig()
|
||
|
|
const body = await readBody(event)
|
||
|
|
|
||
|
|
if (body.password === config.adminPassword) {
|
||
|
|
return { valid: true }
|
||
|
|
}
|
||
|
|
|
||
|
|
return { valid: false }
|
||
|
|
})
|