self directory

This commit is contained in:
pawan-dot 2022-10-28 15:15:17 +05:30
parent 79ab25e447
commit aa3480d90a
2 changed files with 13 additions and 13 deletions

View File

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

View File

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