From 280815dce3e079f1054d67e156aae7357f7e3a97 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Tue, 10 Feb 2026 11:18:50 +0330 Subject: [PATCH] shop --- .../products/controllers/category.controller.ts | 2 +- src/modules/products/interface/product.interface.ts | 6 ------ src/modules/shops/controllers/shops.controller.ts | 8 -------- src/modules/shops/providers/shops.service.ts | 13 ------------- src/modules/utils/cache.service.ts | 2 -- 5 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/modules/products/controllers/category.controller.ts b/src/modules/products/controllers/category.controller.ts index 2da5bf0..7309998 100644 --- a/src/modules/products/controllers/category.controller.ts +++ b/src/modules/products/controllers/category.controller.ts @@ -27,7 +27,7 @@ export class CategoryController { return this.categoryService.findAllByShopSlug(slug); } - /*** Admin ***/ + //====================== Admin ====================== @Post('admin/categories') @ApiOperation({ summary: 'Create category' }) diff --git a/src/modules/products/interface/product.interface.ts b/src/modules/products/interface/product.interface.ts index 033e3ca..e69de29 100644 --- a/src/modules/products/interface/product.interface.ts +++ b/src/modules/products/interface/product.interface.ts @@ -1,6 +0,0 @@ -export enum MealType { - BREAKFAST = 'breakfast', - LUNCH = 'lunch', - DINNER = 'dinner', - SNACK = 'snack', -} diff --git a/src/modules/shops/controllers/shops.controller.ts b/src/modules/shops/controllers/shops.controller.ts index bdf8aff..532766b 100644 --- a/src/modules/shops/controllers/shops.controller.ts +++ b/src/modules/shops/controllers/shops.controller.ts @@ -55,14 +55,6 @@ export class ShopController { return this.shopService.update(shopId, updateRestaurantDto); } - @UseGuards(AdminAuthGuard) - @ApiBearerAuth() - @Permissions(Permission.UPDATE_RESTAURANT) - @ApiOperation({ summary: 'Delete a shop' }) - @Delete('admin/shops/:id') - remove(@Param('id') id: string) { - return this.shopService.remove(id); - } /** Super Admin Endpoints */ @UseGuards(SuperAdminAuthGuard) diff --git a/src/modules/shops/providers/shops.service.ts b/src/modules/shops/providers/shops.service.ts index 7c6acb0..837dbc4 100644 --- a/src/modules/shops/providers/shops.service.ts +++ b/src/modules/shops/providers/shops.service.ts @@ -163,19 +163,6 @@ export class ShopService { return shop; } - async remove(id: string) { - // Soft delete the shop by setting isActive to false - const shop = await this.shopRepository.findOne({ id }); - - if (!shop) { - throw new NotFoundException(RestMessage.NOT_FOUND); - } - - shop.isActive = false; - await this.em.persistAndFlush(shop); - - return shop; - } async updateSubscription(subscriptionId: string, dto: UpdateSubscriptionDto): Promise { const shop = await this.shopRepository.findOne({ subscriptionId }); diff --git a/src/modules/utils/cache.service.ts b/src/modules/utils/cache.service.ts index b9e7a32..537e694 100755 --- a/src/modules/utils/cache.service.ts +++ b/src/modules/utils/cache.service.ts @@ -8,8 +8,6 @@ export class CacheService implements OnModuleInit { constructor(@Inject(CACHE_MANAGER) private cacheManager: Cache) {} async onModuleInit() { -; - this.logger.log(`Active Cache Store: ${JSON.stringify(this.cacheManager as any)}`); // Should log 'Keyv' or 'KeyvRedis'. If it says 'Memory', the config is still wrong. this.logger.log('Pinging Redis to check connection...');