Skip to content

Commit

Permalink
query: add get user by login query (#486)
Browse files Browse the repository at this point in the history
* query: add get user by login query

* fix: fix login param pattern
  • Loading branch information
Mini256 authored Jun 27, 2022
1 parent 93389f0 commit 9ef712d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/queries/get-user-by-login/params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"cacheHours": 1,
"params": [
{
"name": "login",
"replaces": "Mini256",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-\\[\\]]{0,38}$"
}
]
}
1 change: 1 addition & 0 deletions api/queries/get-user-by-login/template.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select actor_id AS id, 'Mini256' AS login from github_events where actor_login = 'Mini256' limit 1;

0 comments on commit 9ef712d

Please sign in to comment.