-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,19 +24,17 @@ INSERT INTO api.logbook | |
|
||
\echo 'Set config' | ||
SELECT set_config('user.email', '[email protected]', false); | ||
--SELECT set_config('vessel.client_id', 'vessels.urn:mrn:imo:mmsi:123456789', false); | ||
|
||
\echo 'Process badge' | ||
SELECT badges_logbook_fn(5,NOW()::TEXT); | ||
SELECT badges_logbook_fn(6,NOW()::TEXT); | ||
SELECT badges_geom_fn(5,NOW()::TEXT); | ||
SELECT badges_geom_fn(6,NOW()::TEXT); | ||
|
||
\echo 'Check badges for user' | ||
\echo 'Check badges for all users' | ||
SELECT jsonb_object_keys ( a.preferences->'badges' ) FROM auth.accounts a; | ||
|
||
\echo 'Check details from vessel_id kapla' | ||
--SELECT get_user_settings_from_vesselid_fn('vessels.urn:mrn:imo:mmsi:123456789'::TEXT); | ||
SELECT | ||
json_build_object( | ||
'boat', v.name, | ||
|
@@ -68,6 +66,9 @@ SELECT set_config('vessel.id', :'vessel_id', false) IS NOT NULL as vessel_id; | |
\echo 'Process badge' | ||
SELECT badges_moorages_fn(); | ||
|
||
\echo 'Check badges for all users' | ||
SELECT jsonb_object_keys ( a.preferences->'badges' ) FROM auth.accounts a; | ||
|
||
\echo 'Check details from vessel_id aava' | ||
--SELECT get_user_settings_from_vesselid_fn('vessels.urn:mrn:imo:mmsi:787654321'::TEXT); | ||
SELECT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ badges_geom_fn | | |
-[ RECORD 1 ]--+- | ||
badges_geom_fn | | ||
|
||
Check badges for user | ||
Check badges for all users | ||
-[ RECORD 1 ]-----+------------------ | ||
jsonb_object_keys | Helmsman | ||
-[ RECORD 2 ]-----+------------------ | ||
|
@@ -76,6 +76,38 @@ Process badge | |
-[ RECORD 1 ]------+- | ||
badges_moorages_fn | | ||
|
||
Check badges for all users | ||
-[ RECORD 1 ]-----+------------------ | ||
jsonb_object_keys | Helmsman | ||
-[ RECORD 2 ]-----+------------------ | ||
jsonb_object_keys | Wake Maker | ||
-[ RECORD 3 ]-----+------------------ | ||
jsonb_object_keys | Balearic Sea | ||
-[ RECORD 4 ]-----+------------------ | ||
jsonb_object_keys | Stormtrooper | ||
-[ RECORD 5 ]-----+------------------ | ||
jsonb_object_keys | Gulf of Finland | ||
-[ RECORD 6 ]-----+------------------ | ||
jsonb_object_keys | Helmsman | ||
-[ RECORD 7 ]-----+------------------ | ||
jsonb_object_keys | Wake Maker | ||
-[ RECORD 8 ]-----+------------------ | ||
jsonb_object_keys | Club Alaska | ||
-[ RECORD 9 ]-----+------------------ | ||
jsonb_object_keys | Stormtrooper | ||
-[ RECORD 10 ]----+------------------ | ||
jsonb_object_keys | Captain Award | ||
-[ RECORD 11 ]----+------------------ | ||
jsonb_object_keys | Caribbean Sea | ||
-[ RECORD 12 ]----+------------------ | ||
jsonb_object_keys | Gulf of Alaska | ||
-[ RECORD 13 ]----+------------------ | ||
jsonb_object_keys | Gulf of Finland | ||
-[ RECORD 14 ]----+------------------ | ||
jsonb_object_keys | Navigator Award | ||
-[ RECORD 15 ]----+------------------ | ||
jsonb_object_keys | Tropical Traveler | ||
|
||
Check details from vessel_id aava | ||
-[ RECORD 1 ]-+-------------------------------------------------------------------------------------------------------------- | ||
user_settings | {"boat" : "aava", "recipient" : "first_aava", "email" : "[email protected]", "pushover_key" : null} | ||
|