feat: add delete route for the invoice
This commit is contained in:
@@ -367,6 +367,18 @@ export class SubscriptionsService {
|
||||
return { workspaces: userSubscriptions };
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
async checkUserAccessToService(userId: string, serviceId: string) {
|
||||
const userSubscriptions = await this.userSubscriptionsRepository.findOne({
|
||||
where: { user: { id: userId }, plan: { service: { id: serviceId } }, status: SubscriptionStatus.ACTIVE },
|
||||
relations: {
|
||||
plan: { service: true },
|
||||
staff: true,
|
||||
},
|
||||
});
|
||||
return userSubscriptions ? true : false;
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
async addProvisioningJob(userSubscription: UserSubscription, plan: SubscriptionPlan, user: User) {
|
||||
this.logger.debug(`Adding provisioning job for user ${user.id} and subscription ${userSubscription.id}`);
|
||||
|
||||
Reference in New Issue
Block a user