Merge pull request #905 from Human-Connection/850-api-mapbox-check-place-or-region

region and place is no longer created twice.
This commit is contained in:
mattwr18 2019-07-02 12:18:12 -03:00 committed by GitHub
commit 97f31abccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,6 +87,9 @@ const createOrUpdateLocations = async (userId, locationName, driver) => {
}
const session = driver.session()
if (data.place_type.length > 1) {
data.id = 'region.' + data.id.split('.')[1]
}
await createLocation(session, data)
let parent = data