This commit is contained in:
Mr Swift
2024-03-09 20:10:55 +03:30
parent 3c1a7da256
commit 379929844a
9 changed files with 48 additions and 35 deletions
-2
View File
@@ -13,8 +13,6 @@ const createbrand = [
[
body('title').notEmpty().withMessage(_sr.fa.required.title),
body('description').notEmpty().withMessage(_sr.fa.required.description),
body('link').notEmpty().trim().isLowercase().withMessage(_sr.fa.required.field),
],
checkValidations(validationResult),
async (req, res) => {
+1 -5
View File
@@ -3,14 +3,10 @@ const mongoose = require('mongoose');
const brandSchema = new mongoose.Schema({
title: String,
link: {
type: String,
unique: [true, "This link already taken"]
type: String
},
description: String,
logo: String,
},
{
timestamps: true,
}
);
+1 -1
View File
@@ -25,7 +25,7 @@ router.post('/survey', surveyController.createPublic)
/// ///////////// Brand
router.get('/brand', brandController.getbrands)
router.get('/brand/:id', brandController.getbrand)
/// ///////////// Complaint
router.post('/complaint', complaintController.create)