fix import errors
This commit is contained in:
@@ -4,7 +4,7 @@ import { Delivery } from '../entities/delivery.entity';
|
||||
import { DeliveryRepository } from '../repositories/delivery.repository';
|
||||
import { CreateDeliveryDto } from '../dto/create-delivery.dto';
|
||||
import { UpdateDeliveryDto } from '../dto/update-delivery.dto';
|
||||
import { RestRepository } from ../../../shops/repositories/rest.repository';
|
||||
import { ShopRepository } from '../../shops/repositories/rest.repository';
|
||||
import { DeliveryMethodEnum } from '../interface/delivery';
|
||||
import { DeliveryMessage } from 'src/common/enums/message.enum';
|
||||
|
||||
@@ -12,14 +12,14 @@ import { DeliveryMessage } from 'src/common/enums/message.enum';
|
||||
export class DeliveryService {
|
||||
constructor(
|
||||
private readonly deliveryRepository: DeliveryRepository,
|
||||
private readonly restRepository: RestRepository,
|
||||
private readonly shopRepository: ShopRepository,
|
||||
private readonly em: EntityManager,
|
||||
) {}
|
||||
|
||||
async create(restId: string, createDto: CreateDeliveryDto): Promise<Delivery> {
|
||||
const shop = await this.restRepository.findOne({ id: restId });
|
||||
const shop = await this.shopRepository.findOne({ id: restId });
|
||||
if (!shop) {
|
||||
throw new NotFoundException(DeliveryMessage.RESTAURANT_NOT_FOUND);
|
||||
throw new NotFoundException(DeliveryMessage.SHOP_NOT_FOUND);
|
||||
}
|
||||
|
||||
// Check if the delivery method with the same name already exists for this shop
|
||||
|
||||
Reference in New Issue
Block a user