Function destroy_sessions

Source
pub fn destroy_sessions(
    db: &Database,
    auth: &Auth,
) -> Result<(), (u16, &'static str)>
Expand description

/sessions

destroys all entries in the user_session table in db owned by the User associated with auth

§Errors

  • 500: Could not delete sessions

§Panics

  • could not connect to database

TODO: don’t panic if db connection fails, just return an error