Delete duplicate qso['lng'] assignments in application/controllers/Api.php. Longitude is stored in qso['long'], so removing the extra qso['lng'] assignments (from plot_latlng and dxcc fallback) avoids redundant/conflicting keys and keeps the QSO data consistent.
Prefer COL_VUCC_GRIDS over COL_GRIDSQUARE when populating the gridsquare field, and compute plotting coordinates from the grid (via qralatlng) to support VUCC multi-grid line/corner records. Populate lat, long and lng from the grid-derived coordinates, and only fall back to DXCC table coordinates if grid-derived values are not present, avoiding accidental overrides.
Introduce API method logbook_public_slugs_accessible($key) that authorizes the API key, updates last-used timestamp, and returns JSON of all station logbooks (owned or shared) that have non-empty public slugs for the key owner. Add Logbooks_model::public_slugs_accessible_by_user($user_id) to select matching logbooks, label access_level as "owner" for owners or the stored permission_level for shared entries, and order results by logbook_name. Endpoint returns 401 for missing/invalid keys and a success payload with status, count, and logbooks on success.
Introduce GET /api/logbook_public_slugs/{key} in the API controller to return a JSON list of the API key owner's station logbooks that have non-empty public slugs. The endpoint authorizes the key, updates last-used timestamp, responds with 401 for missing/invalid keys or 200 with status, count and logbook entries. Add Logbooks_model::public_slugs_by_user to query station_logbooks for non-null/non-empty public_slug values ordered by logbook_name.
Expose an optional `gridsquare` parameter to logbook_worked_status: update the docblock, parse and normalize the incoming gridsquare, and include it in the response payload. Add worked flags `grid_overall` and `grid_band` (and set them based on logbook_model->check_if_grid_worked_in_logbook results) so clients can check whether a grid square has been worked overall or on a specific band. Input is upper-cased/trimmed like other fields; existing DB logic is left intact.
Introduce POST /api/logbook_worked_status to check "worked" and "confirmed" status for a given callsign (and derived country) against a public logbook. The endpoint requires an API key, logbook_public_slug and callsign, and accepts optional band and mode. It validates input and logbook/station relationships, resolves country via DXCC lookup, maps mode to a main mode, and queries the logbook table for overall and band-specific worked status as well as LoTW/QSL confirmations. Returns structured JSON with worked and confirmed subfields and appropriate HTTP status codes (400/401/404/200). Models used: api_model, logbook_model, logbooks_model; uses configured table_name for DB queries.
Introduces an optimized API endpoint to fetch all pending radio commands for a user in a single call, along with a maintenance endpoint for cleaning up expired and old commands. Updates the documentation to reflect these new endpoints and usage patterns. Adds a QSY endpoint to Dxcluster for queuing frequency/mode commands from the bandmap, and integrates client-side JavaScript to send QSY commands to the selected radio with user feedback. Enhances backend models to support user-scoped cleanup of expired and old commands.
Introduces a new radio command queueing system with API endpoints and a user interface for sending, viewing, and managing radio commands. Adds migration for the radio_commands table, extends the Cat model with command-related methods, and implements new controllers and views for both API and web interfaces. This enables integration with desktop apps and provides users with tools to send, track, and cancel radio commands.
Enhanced the DXCC lookup in Logbook_model to include latitude and longitude in the returned array. Updated API controller to utilize these new fields when returning recent QSOs and callsign lookups, providing more detailed location data in API responses.
The recent_qsos API endpoint now validates and sanitizes the $limit parameter, enforcing a default of 10, a minimum of 1, and a maximum of 50. Additionally, get_last_qsos in Logbook_model ensures $num is always an integer to prevent SQL injection.
Removed the limit parameter validation and sanitization from Api.php, delegating limit handling elsewhere. Changed the SQL query in Logbook_model.php to use LEFT JOIN for station_profile, ensuring all logbook records are included even if no matching station_profile exists.
Squashed commit of the following:
commit 83f12cc945fa717945062a841854498368d8cb10
Author: phl0
Date: Tue Mar 21 12:24:53 2023 +0100
Change default value to current date/time
commit e1cb72f3fc80f581ee30d927772efe0ffe155059
Author: phl0
Date: Tue Mar 21 12:05:46 2023 +0100
Add functions to update timestamps
commit d303f629a0b2d200e49da36766cf72ed37c3fe92
Merge: 01a9606a 7dd76923
Author: phl0
Date: Tue Mar 21 11:13:21 2023 +0100
Merge remote-tracking branch 'origin/dev' into apiKeyLastUsed
commit 01a9606afde6aad6be0f07f34f8584e540c50e8c
Author: phl0
Date: Tue Mar 21 11:11:51 2023 +0100
Reorder DB migration due to previous commits
commit ec5cd743b96dc1ed0f2740f7b2051f88549f4248
Author: phl0
Date: Fri Mar 17 16:23:34 2023 +0100
Basics for API key last used
Skips check_station_is_accessible() if import is coming from API this is because api qso import doesn't have a session thus automatically fails.
Extra checks must be done on the api calls to make sure things are safe.
Fixes#1381
Co-Authored-By: Florian (DF2ET) <github@florian-wolters.de>