pub fn create_token(
db: &Database,
name: &str,
permissions: &str,
created_by: Option<i64>,
expires_at: Option<&str>,
) -> Result<(String, ApiToken)>Expand description
Create a new API token. Returns the raw token string (shown once) and the stored record.