ApprovebyEmail not working

This is the example code for approveByEmail but it does not seem to be working properly

import wixUsers from 'wix-users-backend'; 

export function myBackendFunction(email) 
{wixUsers.approveByEmail(email) .then( (sessionToken) => { return {sessionToken, "approved": true}; } ); .catch( (error) => { return {"approved": false, "reason": error}; } ); } }

Hi,
Can you please elaborate? Are you getting an error? What exactly isn’t working? Maybe provide an example site where we can see the problem?

What I am trying to do is call a backend function that will approve the user with the email I am passing. Simply approve the user when the function is called then return the approved status. This is the code that I am trying to use that I copied from the reference page but does not work.