Endpoint duplikat ini membingungkan platform lain karena menggunakan
GET method sementara endpoint canonical POST /search sudah tersedia.
Platform lain (Flutter, web) cukup gunakan POST /search dengan
body parameter device_type="ODP".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Ubah map key dari "BackboneCode" ke "backbone_code" di UpdateTowerWithMultipleImages
agar GORM memetakan ke nama kolom yang benar di database
- Ubah c.PostForm("device_id") ke c.PostForm("dev_id") di UpdateTower controller
agar konsisten dengan key yang dikirim frontend dan handler CreateTower
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CreateTower and UpdateTower multipart handlers were building the DTO
without reading backbone_code from PostForm, so the field was always nil
even when the frontend sent it. Added c.PostForm("backbone_code") parsing
in both handlers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Towers can now be explicitly assigned to a backbone by setting
backbone_code. This field is included in create/update DTOs and
the response. The backbone OSRM routing merges these tower waypoints
with Closure waypoints, sorted by distance from OTB-start.
Run once on DB: ALTER TABLE towers ADD COLUMN backbone_code VARCHAR(255);
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DeviceEndID was uuid.UUID (non-nullable) in entity, DTO, and response.
Sending empty string from the frontend caused "invalid uuid" parse error.
Changed to *uuid.UUID throughout. CreateFishbone now skips end device
lookup, type validation, port check, and port-usage update when
DeviceEndID is nil. UpdateFishbone pointer comparisons fixed accordingly.
Run once on DB: ALTER TABLE fishbone ALTER COLUMN dev_end_id DROP NOT NULL;
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GetAllDeviceDetails, GetDevicesWithoutConnections, GetDevicesWithoutTowers
now pass nil geocoder to avoid Nominatim calls on list requests.
This reduces GET /device-details response time from ~2 minutes to <1s.
- Added sync.Map cache to nominatimGeocoder so repeated calls for the
same coordinates (e.g. GetDeviceDetailsByID) hit cache instead of
Nominatim, preventing HTTP 429 rate limit errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>