Update
This commit is contained in:
@@ -14,10 +14,10 @@ import (
|
||||
|
||||
type TableProcessor struct {
|
||||
tableRepo *repository.TableRepository
|
||||
orderRepo *repository.OrderRepository
|
||||
orderRepo repository.OrderRepository
|
||||
}
|
||||
|
||||
func NewTableProcessor(tableRepo *repository.TableRepository, orderRepo *repository.OrderRepository) *TableProcessor {
|
||||
func NewTableProcessor(tableRepo *repository.TableRepository, orderRepo repository.OrderRepository) *TableProcessor {
|
||||
return &TableProcessor{
|
||||
tableRepo: tableRepo,
|
||||
orderRepo: orderRepo,
|
||||
@@ -136,7 +136,7 @@ func (p *TableProcessor) OccupyTable(ctx context.Context, tableID uuid.UUID, req
|
||||
}
|
||||
|
||||
// Verify order exists
|
||||
order, err := p.orderRepo.GetByID(ctx, req.OrderID)
|
||||
_, err = p.orderRepo.GetByID(ctx, req.OrderID)
|
||||
if err != nil {
|
||||
return nil, errors.New("order not found")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user