소스 검색

Bug fix: updating location did not work correctly.

Lee Morgan 5 년 전
부모
커밋
977078df52
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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`;