shop
This commit is contained in:
@@ -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 });
|
||||
|
||||
@@ -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...');
|
||||
|
||||
Reference in New Issue
Block a user