return votes after vote

This commit is contained in:
2019-09-20 22:42:50 +02:00
parent 2311d3986e
commit a37afc1ada
6 changed files with 41 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
create or replace function vote(reference regclass, _target_id uuid, _created_by_id uuid, _note int, _anonymous bool default true) returns void
create or replace function vote(reference regclass, _target_id uuid, _created_by_id uuid, _note int, _anonymous bool default true, out resource json)
language plpgsql as
$$
begin
@@ -29,6 +29,8 @@ begin
else
raise exception '% no implemented', reference::text;
end if;
select count_vote(reference, _target_id) into resource;
end;
$$;