fix : create restuarant

This commit is contained in:
2026-01-08 11:20:30 +03:30
parent b3b26bbcb1
commit 0451de4b33
2 changed files with 11 additions and 17 deletions
@@ -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(),