feat: store user agent with sessions
This commit is contained in:
parent
5112a6ce35
commit
2c44f788d9
9 changed files with 23 additions and 5 deletions
|
|
@ -59,6 +59,7 @@ impl gpodder::AuthStore for SqliteRepository {
|
|||
id: session.id,
|
||||
last_seen: DateTime::from_timestamp(session.last_seen, 0).unwrap(),
|
||||
user: user.into(),
|
||||
user_agent: session.user_agent.clone(),
|
||||
})),
|
||||
Ok(None) => Ok(None),
|
||||
Err(err) => Err(DbError::from(err).into()),
|
||||
|
|
@ -79,6 +80,7 @@ impl gpodder::AuthStore for SqliteRepository {
|
|||
id: session.id,
|
||||
user_id: session.user.id,
|
||||
last_seen: session.last_seen.timestamp(),
|
||||
user_agent: session.user_agent.clone(),
|
||||
}
|
||||
.insert_into(sessions::table)
|
||||
.execute(&mut self.pool.get().map_err(DbError::from)?)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue