mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-29 08:49:17 +03:00
19 lines
450 B
JavaScript
19 lines
450 B
JavaScript
import { runQuery } from "~/node_common/data/utilities";
|
|
|
|
export default async ({ email }) => {
|
|
return await runQuery({
|
|
label: "DELETE_VERIFICATION_BY_EMAIL",
|
|
queryFn: async (DB) => {
|
|
const data = await DB.from("verifications").where({ email }).del().returning("*");
|
|
|
|
return data;
|
|
},
|
|
errorFn: async (e) => {
|
|
return {
|
|
error: true,
|
|
decorator: "DELETE_VERIFICATION_BY_EMAIL",
|
|
};
|
|
},
|
|
});
|
|
};
|