From: Anton Khorev Date: Tue, 31 Dec 2024 20:25:11 +0000 (+0300) Subject: Don't pass url to createNote() X-Git-Tag: live~152^2~13 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/f169299b53084543698bf143e4d9f77f2322a1b5 Don't pass url to createNote() --- diff --git a/app/assets/javascripts/index/new_note.js b/app/assets/javascripts/index/new_note.js index e5d365589..6504bae9e 100644 --- a/app/assets/javascripts/index/new_note.js +++ b/app/assets/javascripts/index/new_note.js @@ -35,14 +35,14 @@ OSM.NewNote = function (map) { OSM.router.route("/note/new"); }); - function createNote(marker, text, url) { + function createNote(marker, text) { var location = marker.getLatLng().wrap(); marker.options.draggable = false; marker.dragging.disable(); $.ajax({ - url: url, + url: "/api/0.6/notes.json", type: "POST", oauth: true, data: { @@ -154,7 +154,7 @@ OSM.NewNote = function (map) { e.preventDefault(); $(this).prop("disabled", true); - createNote(newNoteMarker, text, "/api/0.6/notes.json"); + createNote(newNoteMarker, text); }); return map.getState();