update is acive
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user