add : toggle business activeness

This commit is contained in:
2026-03-16 16:40:12 +03:30
parent ba9aa004fe
commit f1d25b895a
6 changed files with 33 additions and 3 deletions
@@ -164,7 +164,20 @@ export class BusinessesService {
return this.quotaPurchaseService.purchaseQuota(business, purchaseDto);
}
//********************************************* */
async findBusinesses(query: FindBusinessesDto) {
return this.businessRepository.findAllPaginated(query)
}
//********************************************* */
async businessToggleActive(businessId: string) {
const business = await this.getBusinessById(businessId)
business.isActive=!business.isActive
await this.em.flush()
return business
}
}