Created
February 16, 2023 18:16
-
-
Save shanwixcode/1d0ddb645fb3906c91cec8a39373208b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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