feat(survey): delete survey when deleting a user

This commit is contained in:
Aminejv 2021-08-02 17:15:28 +01:00
parent d63c745ea4
commit 150ea7710f

View File

@ -35,7 +35,9 @@ export default async ({ id }) => {
.orWhere({ userId: id })
.del();
const usage = await DB.from("usage").where("userId", id).del();
const usage = await DB.from("usage").where({ userId: id }).del();
const surveys = await DB.from("surveys").where({ ownerId: id }).del();
const data = await DB.from("users").where({ id }).del().returning("*");