fix: spell check

This commit is contained in:
Sathishkumar Krishnan
2021-12-31 12:01:59 +05:30
parent 50016580e1
commit ab925e236b
3 changed files with 7 additions and 7 deletions

View File

@@ -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);
} }

View File

@@ -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,

View File

@@ -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,