mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-19 17:57:05 +03:00
14 lines
339 B
TypeScript
14 lines
339 B
TypeScript
|
import { deleteApp } from '~~/server/shared'
|
||
|
|
||
|
export default defineEventHandler(async (event) => {
|
||
|
const { server } = getRouterParams(event)
|
||
|
const { key } = getQuery(event)
|
||
|
|
||
|
if (key !== String(useRuntimeConfig().adminKey))
|
||
|
return { status: false, error: 'incorrect key' }
|
||
|
|
||
|
await deleteApp(server)
|
||
|
|
||
|
return { status: true }
|
||
|
})
|