2022-07-04 00:01:24 +00:00
|
|
|
use crate::err::Error;
|
|
|
|
use std::sync::Arc;
|
2022-12-30 08:23:19 +00:00
|
|
|
use surrealdb::dbs::Auth;
|
|
|
|
use surrealdb::dbs::Session;
|
2022-07-04 00:01:24 +00:00
|
|
|
|
|
|
|
pub async fn clear(session: &mut Session) -> Result<(), Error> {
|
|
|
|
session.au = Arc::new(Auth::No);
|
2022-10-04 21:03:40 +00:00
|
|
|
session.tk = None;
|
|
|
|
session.sc = None;
|
|
|
|
session.sd = None;
|
2022-07-04 00:01:24 +00:00
|
|
|
Ok(())
|
|
|
|
}
|