This commit is contained in:
2026-02-10 11:18:50 +03:30
parent 71670ffebf
commit 280815dce3
5 changed files with 1 additions and 30 deletions
@@ -27,7 +27,7 @@ export class CategoryController {
return this.categoryService.findAllByShopSlug(slug);
}
/*** Admin ***/
//====================== Admin ======================
@Post('admin/categories')
@ApiOperation({ summary: 'Create category' })
@@ -1,6 +0,0 @@
export enum MealType {
BREAKFAST = 'breakfast',
LUNCH = 'lunch',
DINNER = 'dinner',
SNACK = 'snack',
}
@@ -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)
@@ -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<Shop> {
const shop = await this.shopRepository.findOne({ subscriptionId });
-2
View File
@@ -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...');