add: app sdk client auth flow example
This commit is contained in:
parent
0138bf4cd4
commit
9ccbc69405
9 changed files with 95 additions and 27 deletions
|
@ -196,8 +196,8 @@ impl DataManager {
|
|||
|
||||
let res = query_row!(
|
||||
&conn,
|
||||
"SELECT * FROM users WHERE (SELECT jsonb_array_elements(grants::jsonb) @> ('{\"token\":\"' || $1 || '\"}')::jsonb)",
|
||||
&[&token],
|
||||
"SELECT * FROM users WHERE grants LIKE $1",
|
||||
&[&format!("%\"token\":\"{token}\"%")],
|
||||
|x| Ok(Self::get_user_from_row(x))
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue