fix : create restuarant
This commit is contained in:
@@ -124,11 +124,17 @@ export class RestaurantService {
|
||||
}
|
||||
const plan = userSubscription.plan.name.includes("دلیوری") ? PlanEnum.Premium : PlanEnum.Base;
|
||||
|
||||
const user = await this.usersService.findOneById(userSubscription.user.id)
|
||||
|
||||
if (!user) {
|
||||
throw new BadRequestException("User Not found");
|
||||
}
|
||||
|
||||
const setupRestaurantDto: ISetupRestaurant = {
|
||||
name: dto.name,
|
||||
name: userSubscription.businessName,
|
||||
slug: dto.slug,
|
||||
establishedYear: dto.establishedYear,
|
||||
phone: dto.phone,
|
||||
establishedYear: 1400,
|
||||
phone: user.user.phone,
|
||||
plan,
|
||||
subscriptionId: dto.userSubscriptionId,
|
||||
subscriptionEndDate: userSubscription.endDate.toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user