change dependencies to be more sharable

This commit is contained in:
2026-01-14 12:01:09 +00:00
parent 26f2f5dbd0
commit caf17a7254
6 changed files with 19 additions and 13 deletions

View File

@@ -1,12 +1,18 @@
use crate::controller::Controller;
impl Controller {
pub async fn add_domain_to_dns(&self, domain: &str) -> Result<(), Box<dyn std::error::Error>> {
pub(in crate::controller) async fn add_domain_to_dns(
&self,
domain: &str,
) -> Result<(), Box<dyn std::error::Error>> {
self.dns_manager.add_domain(domain, self.pub_addr).await?;
Ok(())
}
pub async fn del_domain_to_dns(&self, domain: &str) -> Result<(), Box<dyn std::error::Error>> {
pub(in crate::controller) async fn del_domain_to_dns(
&self,
domain: &str,
) -> Result<(), Box<dyn std::error::Error>> {
self.dns_manager.del_domain(domain).await?;
Ok(())
}