shellphone.app/app/api/ddd.ts

17 lines
361 B
TypeScript

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();
}