support pause a network (#528)

This commit is contained in:
Sijie.Sun
2024-12-22 20:29:59 -05:00
committed by GitHub
parent 4cf61f0d4a
commit f3de00be37
6 changed files with 272 additions and 36 deletions

View File

@@ -15,6 +15,8 @@ use easytier::{
};
use tokio::sync::{broadcast, RwLock};
use crate::db::ListNetworkProps;
use super::storage::{Storage, StorageToken, WeakRefStorage};
#[derive(Debug)]
@@ -206,7 +208,11 @@ impl Session {
let local_configs = match storage
.db
.list_network_configs(user_id, Some(req.machine_id.unwrap().into()), true)
.list_network_configs(
user_id,
Some(req.machine_id.unwrap().into()),
ListNetworkProps::EnabledOnly,
)
.await
{
Ok(configs) => configs,