Fix moving points on the map

This commit is contained in:
Eugene Burmakin 2025-03-24 00:01:18 +01:00
parent b1a0aa2179
commit 24a148b181
4 changed files with 10 additions and 3 deletions

View file

@ -1 +1 @@
0.25.3 0.25.4

View file

@ -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/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). 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 # 0.25.3 - 2025-03-22
## Fixed ## Fixed

View file

@ -32,7 +32,7 @@ class Api::V1::PointsController < ApiController
def update def update
point = current_api_user.tracked_points.find(params[:id]) 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 render json: point_serializer.new(point).call
end end

View file

@ -501,10 +501,11 @@ export default class extends BaseController {
} }
deletePoint(id, apiKey) { deletePoint(id, apiKey) {
fetch(`/api/v1/points/${id}?api_key=${apiKey}`, { fetch(`/api/v1/points/${id}`, {
method: 'DELETE', method: 'DELETE',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
} }
}) })
.then(response => { .then(response => {