Skip to content

Commit

Permalink
feat: Adding admin ability to search by github_id (#1960)
Browse files Browse the repository at this point in the history
* See nftstorage/admin.storage#68
  • Loading branch information
jsdevel authored Jun 7, 2022
1 parent ad5773c commit 65b551c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DROP VIEW admin_search;

CREATE VIEW admin_search as
select
u.id::text as user_id,
u.email as email,
u.github_id as github_id,
ak.secret as token,
ak.id::text as token_id,
ak.deleted_at as deleted_at,
akh.inserted_at as reason_inserted_at,
akh.reason as reason,
akh.status as status
from public.user u
full outer join auth_key ak on ak.user_id = u.id
full outer join (select * from auth_key_history where deleted_at is null) as akh on akh.auth_key_id = ak.id;
1 change: 1 addition & 0 deletions packages/api/db/tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ CREATE VIEW admin_search as
select
u.id::text as user_id,
u.email as email,
u.github_id as github_id,
ak.secret as token,
ak.id::text as token_id,
ak.deleted_at as deleted_at,
Expand Down

0 comments on commit 65b551c

Please sign in to comment.