mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eaac9d691 | ||
|
|
a916e8a0cb |
@@ -18,7 +18,10 @@ export class LemonResumeSubscription {
|
|||||||
* @param {string} subscriptionSlug - Subscription slug by default main subscription.
|
* @param {string} subscriptionSlug - Subscription slug by default main subscription.
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
public async resumeSubscription(tenantId: number, subscriptionSlug: string = 'main') {
|
public async resumeSubscription(
|
||||||
|
tenantId: number,
|
||||||
|
subscriptionSlug: string = 'main'
|
||||||
|
) {
|
||||||
configureLemonSqueezy();
|
configureLemonSqueezy();
|
||||||
|
|
||||||
const subscription = await PlanSubscription.query().findOne({
|
const subscription = await PlanSubscription.query().findOne({
|
||||||
@@ -34,7 +37,7 @@ export class LemonResumeSubscription {
|
|||||||
cancelled: false,
|
cancelled: false,
|
||||||
});
|
});
|
||||||
if (returnedSub.error) {
|
if (returnedSub.error) {
|
||||||
throw new ServiceError(ٌٌُERRORS.SOMETHING_WENT_WRONG_WITH_LS);
|
throw new ServiceError(ERRORS.SOMETHING_WENT_WRONG_WITH_LS);
|
||||||
}
|
}
|
||||||
// Triggers `onSubscriptionResume` event.
|
// Triggers `onSubscriptionResume` event.
|
||||||
await this.eventPublisher.emitAsync(
|
await this.eventPublisher.emitAsync(
|
||||||
|
|||||||
Reference in New Issue
Block a user