update is acive

This commit is contained in:
2026-02-02 12:25:40 +03:30
parent 96108d0b35
commit f72012e2a6
2 changed files with 10 additions and 2 deletions
@@ -214,9 +214,12 @@ export class RestaurantsService {
throw new NotFoundException(RestMessage.NOT_FOUND);
}
const isActive = new Date(dto.subscriptionEndDate) > new Date()
await this.update(restaurant.id, {
plan: dto.newPlan,
subscriptionEndDate:dto.subscriptionEndDate
subscriptionEndDate: dto.subscriptionEndDate,
isActive
})
return restaurant;