Skip to content

Commit

Permalink
Fix Enforce public vessel name to be alphanumeric.
Browse files Browse the repository at this point in the history
Fix typo for pushover notification
  • Loading branch information
xbgmsharp committed Nov 27, 2023
1 parent 0709bc8 commit 6ecb345
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions initdb/02_3_1_signalk_public_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ INSERT INTO public.email_templates VALUES
('monitor_online',
'Boat went Online',
E'__BOAT__ just came online\nFind more details at __APP_URL__/boats\n',
'Boat went Offline',
'Boat went Online',
E'__BOAT__ just came online\nFind more details at __APP_URL__/boats\n'),
('new_badge',
'New Badge!',
Expand Down Expand Up @@ -193,7 +193,7 @@ $new_vessel_entry$ language plpgsql;
create function new_vessel_public_fn() returns trigger as $new_vessel_public$
begin
-- Update user settings with a public vessel name
perform api.update_user_preferences_fn('{public_vessel}', NEW.name);
perform api.update_user_preferences_fn('{public_vessel}', regexp_replace(NEW.name, '\W+', '', 'g'));
return NEW;
END;
$new_vessel_public$ language plpgsql;
Expand Down

0 comments on commit 6ecb345

Please sign in to comment.