Hi there,
When I update one document (a user for instance), I need to update also this user to a third party service.
In this regard, I wrote something like that
// Update a User
router.put('/user/:recordId', permissionMiddlewareCreator.update(), async (request, response, next) => {
// Learn what this route does here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/routes/default-routes#update-a-record
if (!request.params.recordId) return next();
const user = await UserObject.findById(request.params.recordId);
await thirdparty.updateUser(user);
next();
});
but the user
here is the one BEFORE the update, and I need the one AFTER, how can I do ?
I tried to look for an answer in the previous topics, but couldn’t find any…
thanks !