Przeglądaj źródła

Bug fix: updating location did not work correctly.

Lee Morgan 4 lat temu
rodzic
commit
977078df52
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      controllers/gallery.js

+ 4 - 1
controllers/gallery.js

@@ -107,7 +107,10 @@ module.exports = {
 
                 response[1].title = req.body.title;
                 response[1].tags = req.body.tags.split(",");
-                response[1].location = req.body.location.split(", ");
+                response[1].location = {
+                    type: "Point",
+                    coordinates: req.body.location.split(", ")
+                };
 
                 let handleImage = (fileData)=>{
                     let fileString = `/galleryImages/${createId(25)}.jpg`;