enum mongoose doesnt trigger error code example
Example: enum mongoose doesnt trigger error
Order.update(
{ _id: orderId, shop: shopId },
{ $set: { status: status }},
{ upsert: true, runValidators: true }, function(err) {
console.log(err);
callback(err);
}