UNPKG

@cocalc/server

Version:

CoCalc server functionality: functions used by either the hub and the next.js server

13 lines 530 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const client_1 = require("@cocalc/server/stripe/client"); const misc_1 = require("@cocalc/util/misc"); async function setDefaultSource(account_id, default_source) { if (!(0, misc_1.isValidUUID)(account_id)) { throw Error("invalid uuid"); } const stripe = new client_1.StripeClient({ account_id }); await stripe.setDefaultSource(default_source); } exports.default = setDefaultSource; //# sourceMappingURL=set-default-source.js.map