update contact info on verification

Im using the following code to approve users on the site when the link is clicked

export function doApproval(token) {
// approve the user
return wixUsers.approveByToken(token)
// user is now active, but not logged in
// return the session token to log in the user client-side
.then( (sessionToken) => {
 
return {sessionToken, "approved": true};
} )
.catch( (error) => {
return {"approved": false, "reason": error};
} );
}

When the user is approved i would also like to update a field in their contact information.
say its a text field called emailVerified and i want the value to say “Email Verified”

can this be done?

I know there is

export function myBackendFunction(contactId, firstName, lastName, email, phone) {
  wixCrm.updateContact(contactId, {
      "firstName": firstName,
      "lastName": lastName,
      "emails": [email],
      "phones": [phone]
  } )
    .then( () => {
      // contact has been updated
    } )
    .catch( (err) => {
      // there was an error updating the contact
    } );
}

But im not sure how to apply it here

Hello.

You can add ’ Email Verified’ as a custom field or label to your contact then add it to your contactUpdate() function above. You can check ContactInfo to see the correct way to reference it in your code.

Good luck!

Any clues on how I can put that code in with mine?