docs(gpodder): document session last_seen timestamp's precision should be at least to the second
parent
705b347775
commit
0bb0c5657a
|
@ -45,6 +45,8 @@ pub trait AuthStore {
|
|||
fn insert_user(&self, username: &str, password_hash: &str) -> Result<User, AuthErr>;
|
||||
|
||||
/// Create a new session for a user with the given session ID
|
||||
///
|
||||
/// The `last_seen` timestamp's precision should be at least accurate to the second
|
||||
fn insert_session(&self, session: &Session) -> Result<(), AuthErr>;
|
||||
|
||||
/// Remove the session with the given session ID
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
mod common;
|
||||
|
||||
use chrono::SubsecRound;
|
||||
use gpodder::{AuthStore, Session};
|
||||
use gpodder_sqlite::SqliteRepository;
|
||||
|
||||
|
@ -34,7 +35,8 @@ fn test_create_session() {
|
|||
|
||||
let new_session = Session {
|
||||
id: 123,
|
||||
last_seen: chrono::Utc::now(),
|
||||
//
|
||||
last_seen: chrono::Utc::now().trunc_subsecs(0),
|
||||
user: users[0].clone(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue