fix
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user