surrealpatch/lib/src/iam/clear.rs
2023-06-09 13:45:07 +00:00

12 lines
254 B
Rust

use crate::dbs::Auth;
use crate::dbs::Session;
use crate::err::Error;
use std::sync::Arc;
pub fn clear(session: &mut Session) -> Result<(), Error> {
session.au = Arc::new(Auth::No);
session.tk = None;
session.sc = None;
session.sd = None;
Ok(())
}