Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiorowski committed Oct 3, 2024
1 parent aa42e67 commit 5e077f6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions service-users/src/token_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ use std::str::FromStr;
use uuid::Uuid;

pub struct Token {
pub id: Uuid,
pub created: time::OffsetDateTime,
pub updated: time::OffsetDateTime,
pub user_id: Uuid,
}

impl TryFrom<tokio_postgres::Row> for Token {
type Error = anyhow::Error;
fn try_from(value: tokio_postgres::Row) -> std::result::Result<Self, Self::Error> {
Ok(Token {
id: value.try_get("id")?,
created: value.try_get("created")?,
updated: value.try_get("updated")?,
user_id: value.try_get("user_id")?,
})
}
Expand Down

0 comments on commit 5e077f6

Please sign in to comment.