declare
username text;
begin
SELECT public.users.username INTO username FROM public.users WHERE id = user_uuid;
perform net.http_post(
url:='https://discord.com/api/webhooks/.../...',
headers:='{"Content-Type": "application/json"}'::jsonb,
body:=json_build_object('content', '**' || username || '**: ' || feedback)::jsonb
);
return;
end;
declare
username text;
begin
SELECT public.users.username INTO username FROM public.users WHERE id = user_uuid;
perform net.http_post(
url:='https://discord.com/api/webhooks/.../...',
headers:='{"Content-Type": "application/json"}'::jsonb,
body:=json_build_object('content', '**' || username || '**: ' || feedback)::jsonb
);
return;
end;