Skip to content

Commit

Permalink
resolving conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndevu12 committed Jun 3, 2024
2 parents 5553358 + 85e590e commit f562fe0
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/__test__/cart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,4 +625,4 @@ describe('Cart| Order management for guest/buyer', () => {
expect(response.body.data.cart).toBeDefined;
});
});
});
});
3 changes: 2 additions & 1 deletion src/__test__/test-assets/DatabaseCleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ export const cleanDatabase = async () => {
// console.log('Database cleaned');
// }).catch(error => {
// console.error('Error cleaning database:', error);
// });

// });
4 changes: 2 additions & 2 deletions src/routes/ProductRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ router.put('/vendor/orders/:id', authMiddleware as RequestHandler, hasRole('VEND
router.get('/admin/orders', authMiddleware as RequestHandler, hasRole('ADMIN'), getBuyerVendorOrders);
router.get('/admin/orders/:id', authMiddleware as RequestHandler, hasRole('ADMIN'), getSingleBuyerVendorOrder);
router.put('/admin/orders/:id', authMiddleware as RequestHandler, hasRole('ADMIN'), updateBuyerVendorOrder);
router.post('/payment/:id', authMiddleware as RequestHandler, hasRole('BUYER'), Payment)
router.post('/payment/:id', authMiddleware as RequestHandler, hasRole('BUYER'), Payment);

export default router;
export default router;
3 changes: 2 additions & 1 deletion src/services/orderServices/updateOrderService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,5 @@ async function processRefund (order: Order, entityManager: EntityManager) {

function isOrderFinalStatus (status: string): boolean {
return ['cancelled', 'delivered', 'returned', 'completed'].includes(status);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ export const getRecommendedProductsService = async (req: Request, res: Response)
} catch (error) {
return responseError(res, 400, (error as Error).message);
}
};
};
2 changes: 1 addition & 1 deletion src/services/productServices/listAllProductsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ export const listAllProductsService = async (req: Request, res: Response) => {
} catch (error) {
responseError(res, 400, (error as Error).message);
}
};
};
2 changes: 1 addition & 1 deletion src/services/productServices/readProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ export const readProductService = async (req: Request, res: Response) => {
} catch (error) {
responseError(res, 400, (error as Error).message);
}
};
};
2 changes: 1 addition & 1 deletion src/services/productServices/viewSingleProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export const viewSingleProduct = async (req: Request, res: Response) => {
console.error('Error handling request:', error);
res.status(500).send('Error fetching product details');
}
};
};

0 comments on commit f562fe0

Please sign in to comment.