make it betterv

This commit is contained in:
pawan-dot 2022-06-30 13:39:31 +05:30
parent 8749cb9065
commit 140d863824
5 changed files with 8 additions and 2 deletions

View File

@ -14,7 +14,8 @@ export const createBanner = async (req, res) => {
folder: "cmp/image",
},
function (error, result) { (result, error) });
const { title, section, startDate, endDate, subTitle } = req.body;
const { title, section, startDate, subSection, endDate, subTitle } = req.body;
const data = await Banners.create({
title,
subTitle,
@ -24,7 +25,8 @@ export const createBanner = async (req, res) => {
},
section,
startDate,
endDate
endDate,
subSection
});

View File

@ -24,6 +24,10 @@ const bannerSchema = new mongoose.Schema(
type: String,
required: true
},
subSection: {
type: String,
},
startDate: {
type: Date,
required: true

BIN
tmp/tmp-1-1656486816946 Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
tmp/tmp-1-1656487168539 Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
tmp/tmp-2-1656487337756 Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB