fix web show dup entry for same machine (#526)

This commit is contained in:
Sijie.Sun
2024-12-21 11:51:01 -05:00
committed by GitHub
parent 4e5915f98e
commit 4cf61f0d4a
7 changed files with 82 additions and 30 deletions

View File

@@ -1,13 +1,14 @@
pub mod session;
pub mod storage;
use std::sync::Arc;
use std::{collections::BTreeMap, str::FromStr, sync::Arc};
use dashmap::DashMap;
use easytier::{
common::scoped_task::ScopedTask, proto::web::HeartbeatRequest, tunnel::TunnelListener,
};
use session::Session;
use sqlx::types::chrono;
use storage::{Storage, StorageToken};
use crate::db::Db;
@@ -93,7 +94,7 @@ impl ClientManager {
.map(|item| item.value().clone())
}
pub fn list_machine_by_token(&self, token: String) -> Vec<url::Url> {
pub async fn list_machine_by_token(&self, token: String) -> Vec<url::Url> {
self.storage.list_token_clients(&token)
}