refactoring: securize find_user_by_*

This commit is contained in:
2019-07-26 16:27:46 +02:00
parent 4ce81c6210
commit 8581ebb558
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ $$
declare declare
_id alias for id; _id alias for id;
begin begin
select to_json(u) into resource select to_jsonb(u) - 'password' into resource
from "user" as u from "user" as u
where u.id = _id; where u.id = _id;
end; end;

View File

@@ -3,7 +3,7 @@ $$
declare declare
_username alias for username; _username alias for username;
begin begin
select to_json(u) into resource select to_jsonb(u) - 'password' into resource
from "user" as u from "user" as u
where u.username = _username; where u.username = _username;
end; end;