Skip to main content

Module update

Module update 

Source

Re-exportsยง

use std::time::Duration; ๐Ÿ”’
use std::time::SystemTime; ๐Ÿ”’
use axum::extract::State; ๐Ÿ”’
use ruma::JsOption; ๐Ÿ”’
use ruma::MilliSecondsSinceUnixEpoch; ๐Ÿ”’
use ruma::UInt; ๐Ÿ”’
use synapse_admin_api::registration_tokens::update::v1 as update; ๐Ÿ”’
use tuwunel_core::Err; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::utils::time::timepoint_from_epoch; ๐Ÿ”’
use tuwunel_service::registration_tokens::TokenExpires; ๐Ÿ”’
use tuwunel_service::registration_tokens::TokenInfo; ๐Ÿ”’
use super::database_token_response; ๐Ÿ”’
use crate::Ruma; ๐Ÿ”’
use crate::require_admin; ๐Ÿ”’

Functionsยง

admin_update_token_route ๐Ÿ”’
PUT /_synapse/admin/v1/registration_tokens/{token}
apply_age ๐Ÿ”’
Fold the tri-state expiry_time over the stored expiry, converting a set millisecond timestamp into a SystemTime.
apply_uses ๐Ÿ”’
Fold the tri-state uses_allowed over the stored cap: an undefined field leaves it unchanged, an explicit null clears it.