Lots of route and controller method names refactoring, which also necessitated editing of fetch methods in the front end es6 code

This commit is contained in:
Jonny Barnes 2017-02-16 15:35:25 +00:00
parent 8a6e99d97e
commit b8c0724036
23 changed files with 88 additions and 99 deletions

View file

@ -46,7 +46,7 @@ const makeOptionsForForm = (map, position, places = null) => {
//position is output of navigator.geolocation call
export default function addMapWithPlaces(div, position) {
fetch('/places/near/' + position.coords.latitude + '/' + position.coords.longitude + '?u=' + position.coords.accuracy, {
fetch('/micropub/places?latitude=' + position.coords.latitude + '&longitude=' + position.coords.longitude + '&u=' + position.coords.accuracy, {
credentials: 'same-origin',
method: 'get'
}).then(function (response) {

View file

@ -82,7 +82,7 @@ export default function makeNewPlaceForm(map) {
formData.append('place-latitude', document.querySelector('#place-latitude').value);
formData.append('place-longitude', document.querySelector('#place-longitude').value);
//post the new place
fetch('/places/new', {
fetch('/micropub/places', {
//send cookies with the request
credentials: 'same-origin',
method: 'post',