From aa3480d90a6e1816e567e06812fa8e5075053079 Mon Sep 17 00:00:00 2001 From: pawan-dot <71133473+pawan-dot@users.noreply.github.com> Date: Fri, 28 Oct 2022 15:15:17 +0530 Subject: [PATCH] self directory --- controllers/bannerController.js | 6 +++--- models/bannerModel.js | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/controllers/bannerController.js b/controllers/bannerController.js index 7e2e63c..42c469c 100644 --- a/controllers/bannerController.js +++ b/controllers/bannerController.js @@ -13,10 +13,10 @@ export const createBanner = async (req, res) => { }, function (error, result) { (result, error) }); - const { title, startDate, endDate, subTitle } = req.body; + const { title, startDate, endDate } = req.body; const data = await Banners.create({ title, - subTitle, + // subTitle, image: { public_id: myCloud.public_id, url: myCloud.secure_url, @@ -88,7 +88,7 @@ export const updateBanner = async (req, res) => { const newBannerData = { title: req.body.title, - subTitle: req.body.subTitle, + // subTitle: req.body.subTitle, // section: req.body.section, // subSection: req.body.subSection, diff --git a/models/bannerModel.js b/models/bannerModel.js index 454ea3a..cd6d4f1 100644 --- a/models/bannerModel.js +++ b/models/bannerModel.js @@ -5,10 +5,10 @@ const bannerSchema = new mongoose.Schema( type: String, required: true }, - subTitle: { - type: String, - required: true - }, + // subTitle: { + // type: String, + // required: true + // }, image: { public_id: { @@ -20,13 +20,13 @@ const bannerSchema = new mongoose.Schema( required: true, }, }, - section: { - type: String, + // section: { + // type: String, - }, - subSection: { - type: String, - }, + // }, + // subSection: { + // type: String, + // }, startDate: { type: Date,