Adds comment

This commit is contained in:
Sebastian Rindom committed 2020-02-05 08:56:01 +01:00
1 parent 8c515fa9d4
commit eed979b9d9
3 files changed
+7 -3

No files matched your search

+2 -1
View File
@@ -7,7 +7,8 @@ export const MedusaErrorTypes = {
DB_ERROR: "database_error", DB_ERROR: "database_error",
INVALID_ARGUMENT: "invalid_argument", INVALID_ARGUMENT: "invalid_argument",
INVALID_DATA: "invalid_data", INVALID_DATA: "invalid_data",
NOT_FOUND: "not_found" NOT_FOUND: "not_found",
NOT_ALLOWED: "not_allowed"
} }
/** /**
+1 -1
View File
@@ -13,7 +13,7 @@ class CustomerModel extends BaseModel {
email: { type: String, required: true, unique: true }, email: { type: String, required: true, unique: true },
first_name: { type: String, required: true }, first_name: { type: String, required: true },
last_name: { type: String, required: true }, last_name: { type: String, required: true },
billingAddress: { type: AddressSchema }, billing_address: { type: AddressSchema },
password_hash: { type: String }, password_hash: { type: String },
metadata: { type: mongoose.Schema.Types.Mixed, default: {} }, metadata: { type: mongoose.Schema.Types.Mixed, default: {} },
} }
+4 -1
View File
@@ -172,7 +172,10 @@ class CartService extends BaseService {
} }
/** /**
* * Adds a line item to the cart.
* @param {string} cartId - the id of the cart that we will add to
* @param {LineItem} lineItem - the line item to add.
* @retur {Promise} the result of the update operation
*/ */
async addLineItem(cartId, lineItem) { async addLineItem(cartId, lineItem) {
const validatedLineItem = this.validateLineItem_(lineItem) const validatedLineItem = this.validateLineItem_(lineItem)