fix: spell check
This commit is contained in:
@@ -60,7 +60,7 @@ module.exports = {
|
|||||||
main_level_id: parent_main_level_id,
|
main_level_id: parent_main_level_id,
|
||||||
current_depth: parent_current_depth + 1,
|
current_depth: parent_current_depth + 1,
|
||||||
parent_sublevel_id: mongoose.Types.ObjectId(parent_id),
|
parent_sublevel_id: mongoose.Types.ObjectId(parent_id),
|
||||||
preffered_inventory: [],
|
preferred_inventory: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
await addSublevelToParent({ type, positions, sub_level_id: sublevelData._id.toString() }, parent_id, parentIsLevel);
|
await addSublevelToParent({ type, positions, sub_level_id: sublevelData._id.toString() }, parent_id, parentIsLevel);
|
||||||
@@ -129,7 +129,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add preffered_inventory to a sublevel
|
* Add preferred_inventory to a sublevel
|
||||||
*/
|
*/
|
||||||
addInventory: async (req, res, next) => {
|
addInventory: async (req, res, next) => {
|
||||||
const { id, inventory } = req.body;
|
const { id, inventory } = req.body;
|
||||||
@@ -144,9 +144,9 @@ module.exports = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
sublevelData.preffered_inventory.push(...inventory);
|
sublevelData.preferred_inventory.push(...inventory);
|
||||||
await sublevelData.save();
|
await sublevelData.save();
|
||||||
res.send({ success: true, data: sublevelData.preffered_inventory });
|
res.send({ success: true, data: sublevelData.preferred_inventory });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
next(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const schema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
enum: SubLevelTypes,
|
enum: SubLevelTypes,
|
||||||
},
|
},
|
||||||
postitions: [
|
positions: [
|
||||||
{
|
{
|
||||||
type: String,
|
type: String,
|
||||||
enum: LevelPositions,
|
enum: LevelPositions,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const schema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
enum: SubLevelTypes,
|
enum: SubLevelTypes,
|
||||||
},
|
},
|
||||||
postitions: [
|
positions: [
|
||||||
{
|
{
|
||||||
type: String,
|
type: String,
|
||||||
enum: LevelPositions,
|
enum: LevelPositions,
|
||||||
@@ -55,7 +55,7 @@ const schema = new mongoose.Schema(
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
preffered_inventory: [
|
preferred_inventory: [
|
||||||
{
|
{
|
||||||
id: {
|
id: {
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
Reference in New Issue
Block a user