diff --git a/.app_version b/.app_version index 3d9dcb1b..35aa2f3c 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.25.3 +0.25.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index e90314c1..10f5c357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +# 0.25.4 - 2025-03-24 + +## Fixed + +- Moving points on the map now works correctly. #957 + # 0.25.3 - 2025-03-22 ## Fixed diff --git a/app/controllers/api/v1/points_controller.rb b/app/controllers/api/v1/points_controller.rb index dc34387c..8eddebf6 100644 --- a/app/controllers/api/v1/points_controller.rb +++ b/app/controllers/api/v1/points_controller.rb @@ -32,7 +32,7 @@ class Api::V1::PointsController < ApiController def update point = current_api_user.tracked_points.find(params[:id]) - point.update(point_params) + point.update(lonlat: "POINT(#{point_params[:longitude]} #{point_params[:latitude]})") render json: point_serializer.new(point).call end diff --git a/app/javascript/controllers/maps_controller.js b/app/javascript/controllers/maps_controller.js index a74aaac3..a93affb4 100644 --- a/app/javascript/controllers/maps_controller.js +++ b/app/javascript/controllers/maps_controller.js @@ -501,10 +501,11 @@ export default class extends BaseController { } deletePoint(id, apiKey) { - fetch(`/api/v1/points/${id}?api_key=${apiKey}`, { + fetch(`/api/v1/points/${id}`, { method: 'DELETE', headers: { 'Content-Type': 'application/json', + 'Authorization': `Bearer ${apiKey}` } }) .then(response => {