-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding admin ability to search by github_id (#1960)
* See nftstorage/admin.storage#68
- Loading branch information
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
packages/api/db/migrations/005-add-github-id-to-admin_search-view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters