shellphone.app/app/api/ddd.ts

17 lines
361 B
TypeScript
Raw Normal View History

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