make it betterv
This commit is contained in:
parent
8749cb9065
commit
140d863824
@ -14,7 +14,8 @@ export const createBanner = async (req, res) => {
|
|||||||
folder: "cmp/image",
|
folder: "cmp/image",
|
||||||
},
|
},
|
||||||
function (error, result) { (result, error) });
|
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({
|
const data = await Banners.create({
|
||||||
title,
|
title,
|
||||||
subTitle,
|
subTitle,
|
||||||
@ -24,7 +25,8 @@ export const createBanner = async (req, res) => {
|
|||||||
},
|
},
|
||||||
section,
|
section,
|
||||||
startDate,
|
startDate,
|
||||||
endDate
|
endDate,
|
||||||
|
subSection
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -24,6 +24,10 @@ const bannerSchema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
subSection: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
|
||||||
startDate: {
|
startDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: true
|
required: true
|
||||||
|
BIN
tmp/tmp-1-1656486816946
Normal file
BIN
tmp/tmp-1-1656486816946
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
tmp/tmp-1-1656487168539
Normal file
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
BIN
tmp/tmp-2-1656487337756
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
Loading…
Reference in New Issue
Block a user