mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 19:27:49 +00:00
Expose metadata platform to frontend
This commit is contained in:
@@ -242,7 +242,7 @@ $vessel_details$
|
|||||||
DECLARE
|
DECLARE
|
||||||
BEGIN
|
BEGIN
|
||||||
RETURN ( WITH tbl AS (
|
RETURN ( WITH tbl AS (
|
||||||
SELECT mmsi,ship_type,length,beam,height,plugin_version FROM api.metadata WHERE vessel_id = current_setting('vessel.id', false)
|
SELECT mmsi,ship_type,length,beam,height,plugin_version,platform FROM api.metadata WHERE vessel_id = current_setting('vessel.id', false)
|
||||||
)
|
)
|
||||||
SELECT json_build_object(
|
SELECT json_build_object(
|
||||||
'ship_type', (SELECT ais.description FROM aistypes ais, tbl t WHERE t.ship_type = ais.id),
|
'ship_type', (SELECT ais.description FROM aistypes ais, tbl t WHERE t.ship_type = ais.id),
|
||||||
@@ -251,7 +251,8 @@ BEGIN
|
|||||||
'length', t.ship_type,
|
'length', t.ship_type,
|
||||||
'beam', t.beam,
|
'beam', t.beam,
|
||||||
'height', t.height,
|
'height', t.height,
|
||||||
'plugin_version', t.plugin_version)
|
'plugin_version', t.plugin_version,
|
||||||
|
'platform', t.platform)
|
||||||
FROM tbl t
|
FROM tbl t
|
||||||
);
|
);
|
||||||
END;
|
END;
|
||||||
|
Reference in New Issue
Block a user