parent
d8ef5dd93a
commit
f8233bcb63
2 changed files with 1 additions and 2 deletions
|
@ -1 +0,0 @@
|
||||||
create index concurrently if not exists "history_idx" on history using btree (user_id, timestamp);
|
|
|
@ -99,7 +99,7 @@ impl Database for Postgres {
|
||||||
#[instrument(skip_all)]
|
#[instrument(skip_all)]
|
||||||
async fn get_session_user(&self, token: &str) -> Result<User> {
|
async fn get_session_user(&self, token: &str) -> Result<User> {
|
||||||
sqlx::query_as::<_, User>(
|
sqlx::query_as::<_, User>(
|
||||||
"select users.id, users.username, user.email, users.password from users
|
"select users.id, users.username, users.email, users.password from users
|
||||||
inner join sessions
|
inner join sessions
|
||||||
on users.id = sessions.user_id
|
on users.id = sessions.user_id
|
||||||
and sessions.token = $1",
|
and sessions.token = $1",
|
||||||
|
|
Loading…
Reference in a new issue