Skip to content

Commit

Permalink
Merge branch 'ft-order-tracking' of https://github.com/atlp-rwanda/kn…
Browse files Browse the repository at this point in the history
…ights-ecomm-be into ft-order-tracking
  • Loading branch information
elijahladdie committed May 25, 2024
2 parents b197572 + 4ab1d7a commit 5e4da3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/services/cartServices/createCart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import { User } from '../../entities/User';
import { getRepository } from 'typeorm';
import { validateCartItem } from '../../helper/cartItemValidator';
import { responseSuccess, responseError } from '../../utils/response.utils';

// nDABIHUNDIYE FOR NOW
export const createCartService = async (req: Request, res: Response) => {
try {
const { error } = validateCartItem(req.body);
if (error) {
responseError(res, 400, error.details[0].message);
return;
return responseError(res, 400, error.details[0].message);
}

if (req.body.quantity < 1) {
Expand Down

0 comments on commit 5e4da3b

Please sign in to comment.