self directory
This commit is contained in:
parent
79ab25e447
commit
aa3480d90a
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user