add : toggle business activeness
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user