shellphone.app/app/api/ddd.ts

17 lines
356 B
TypeScript
Raw Normal View History

2021-07-31 14:33:18 +00:00
import { BlitzApiRequest, BlitzApiResponse } from "blitz"
import db from "db"
export default async function ddd(req: BlitzApiRequest, res: BlitzApiResponse) {
await Promise.all([
db.message.deleteMany(),
db.phoneCall.deleteMany(),
db.phoneNumber.deleteMany(),
db.customer.deleteMany(),
])
await db.user.deleteMany()
res.status(200).end()
}