Skip to content

Instantly share code, notes, and snippets.

@shanwixcode
Created February 16, 2023 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanwixcode/1d0ddb645fb3906c91cec8a39373208b to your computer and use it in GitHub Desktop.
Save shanwixcode/1d0ddb645fb3906c91cec8a39373208b to your computer and use it in GitHub Desktop.
import {accounts} from 'wix-loyalty.v2';
import * as wixAuth from 'wix-auth';
export async function award_points(loyalty_id, options) {
try {
const elevated_earnpoints = wixAuth.elevate(accounts.earnPoints);
const account = await elevated_earnpoints(loyalty_id, options);
return account;
} catch (error) {
console.log(error);
return error;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment