Skip to main contentModule update
Source 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; ๐
- 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.