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 f951e4a2..f7fab29c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ 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-04-02 In this release we're changing the way import files are being stored. Previously, they were being stored in the `raw_data` column of the `imports` table. Now, they are being attached to the import record. All new imports will be using the new storage, to migrate existing imports, you can use the `rake imports:migrate_to_new_storage` task. Run it in the container shell. @@ -20,6 +21,11 @@ If your hardware doesn't have enough memory to migrate the imports, you can dele - Export files are now being attached to the export record instead of being stored in the file system. - Export files can now be stored in S3-compatible storage. +## Fixed + +- Moving points on the map now works correctly. #957 +- `rake points:migrate_to_lonlat` task now also reindexes the points table. + # 0.25.3 - 2025-03-22 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 => { diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 606d4c0d..9b223f40 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,6 +1,6 @@