post delete callback
# support-questions
z
is there a post delete callback for the backend? want to use it to synchronize with my api database
r
hey @zebleck there isn't one. But the delete function is also never automatically called anyway.. and since you have to call it, you can run your post delete logic right after.
z
hm, im calling the deletion in the frontend but need a callback in the backend so i can synchronize with my graphql API which has its own User table 🤔
r
how are you calling deletion from the frontend?
z
not implemented yet but i guess just like this https://supertokens.com/docs/thirdparty/common-customizations/delete-user
Copy code
import {deleteUser} from "supertokens-node";

async function deleteUserForId() {
    let userId = "..." // get the user ID
    await deleteUser(userId); // this will succeed even if the userId didn't exist.
}
r
right. So this will be on the backend - so after
await deleteUser(userId);
, you can run your post delete operaitons..
z
ah thought it will be called on the frontend, but yeah backend makes more sense i guess, thanks!