server v1.0.2
This commit is contained in:
@@ -28,6 +28,7 @@ const restaurantSchema = mongoose.Schema({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
placesId: String,
|
||||||
imgUrl: {
|
imgUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const uploadStrategy = multer({
|
|||||||
cb(null, true);
|
cb(null, true);
|
||||||
},
|
},
|
||||||
limits: { fileSize: 4000000 },
|
limits: { fileSize: 4000000 },
|
||||||
}).single("image");
|
}).single("menuiImage");
|
||||||
|
|
||||||
// POST
|
// POST
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export async function createRestaurant(request, oldRestaurant) {
|
|||||||
type: "Point",
|
type: "Point",
|
||||||
coordinates: request.coordinates,
|
coordinates: request.coordinates,
|
||||||
},
|
},
|
||||||
|
placesId: request.placesId,
|
||||||
imgUrl: img,
|
imgUrl: img,
|
||||||
workingHours: request.workingHours,
|
workingHours: request.workingHours,
|
||||||
description: sanitizer.sanitize.keepUnicode(request.description),
|
description: sanitizer.sanitize.keepUnicode(request.description),
|
||||||
@@ -77,6 +78,7 @@ export async function createRestaurant(request, oldRestaurant) {
|
|||||||
type: "Point",
|
type: "Point",
|
||||||
coordinates: request.coordinates,
|
coordinates: request.coordinates,
|
||||||
},
|
},
|
||||||
|
placesId: request.placesId,
|
||||||
imgUrl: img,
|
imgUrl: img,
|
||||||
workingHours: request.workingHours,
|
workingHours: request.workingHours,
|
||||||
description: sanitizer.sanitize.keepUnicode(request.description),
|
description: sanitizer.sanitize.keepUnicode(request.description),
|
||||||
|
|||||||
Reference in New Issue
Block a user