Lambda-School-Labs/shopping-cart-be

View on GitHub
controllers/cart/getCart.js

Summary

Maintainability
A
1 hr
Test Coverage

Function getCart has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function getCart (req, res) {
  try {
    const cartId = req.params.cart_id
    const cart = await Cart.findById({ _id: cartId })
    if (!cart) {
Severity: Minor
Found in controllers/cart/getCart.js - About 1 hr to fix

    Parsing error: Invalid ecmaVersion.
    Open

    const Cart = require('../../models/cart')
    Severity: Minor
    Found in controllers/cart/getCart.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    There are no issues that match your filters.

    Category
    Status