업데이트
This commit is contained in:
parent
011535a450
commit
b613c87745
@ -44,7 +44,6 @@ const createCategory = async (req, res) => {
|
|||||||
}
|
}
|
||||||
: defaultCover;
|
: defaultCover;
|
||||||
|
|
||||||
console.log({ finalCover, ...others });
|
|
||||||
|
|
||||||
await Categories.create({
|
await Categories.create({
|
||||||
...others,
|
...others,
|
||||||
|
@ -1007,7 +1007,6 @@ const getFiltersByCategory = async (req, res) => {
|
|||||||
const { shop, category } = req.params;
|
const { shop, category } = req.params;
|
||||||
// Fetch shop data
|
// Fetch shop data
|
||||||
const shopData = await Shop.findOne({ slug: shop }).select(['_id']);
|
const shopData = await Shop.findOne({ slug: shop }).select(['_id']);
|
||||||
console.log('Shop Data:', shopData); // Log shop data
|
|
||||||
if (!shopData) {
|
if (!shopData) {
|
||||||
return res
|
return res
|
||||||
.status(404)
|
.status(404)
|
||||||
|
@ -14,7 +14,6 @@ const Search = async (req, res) => {
|
|||||||
const subCatId = subCategory
|
const subCatId = subCategory
|
||||||
? await SubCategory.findById(subCategory).select(['_id'])
|
? await SubCategory.findById(subCategory).select(['_id'])
|
||||||
: '';
|
: '';
|
||||||
console.log(subCatId);
|
|
||||||
const products = await Products.aggregate([
|
const products = await Products.aggregate([
|
||||||
{
|
{
|
||||||
$match: {
|
$match: {
|
||||||
|
@ -58,7 +58,6 @@ const getUserByAdmin = async (req, res) => {
|
|||||||
};
|
};
|
||||||
const updateUser = async (req, res) => {
|
const updateUser = async (req, res) => {
|
||||||
const user = await getUser(req, res);
|
const user = await getUser(req, res);
|
||||||
console.log(req)
|
|
||||||
|
|
||||||
const uid = user._id.toString();
|
const uid = user._id.toString();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user