2021-07-31 15:57:43 +00:00
|
|
|
import { BlitzApiRequest, BlitzApiResponse } from "blitz";
|
2021-07-31 14:33:18 +00:00
|
|
|
|
2021-07-31 15:57:43 +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 15:57:43 +00:00
|
|
|
]);
|
2021-07-31 14:33:18 +00:00
|
|
|
|
2021-07-31 15:57:43 +00:00
|
|
|
await db.user.deleteMany();
|
2021-07-31 14:33:18 +00:00
|
|
|
|
2021-07-31 15:57:43 +00:00
|
|
|
res.status(200).end();
|
2021-07-31 14:33:18 +00:00
|
|
|
}
|