Allow router to be deleted

This commit is contained in:
Romain GERARD
2021-05-28 13:25:01 +02:00
committed by Erèbe - Romain Gerard
parent 9a0d659f19
commit 642e53de4c
3 changed files with 10 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ pub struct Router {
context: Context,
id: String,
name: String,
action: Action,
default_domain: String,
custom_domains: Vec<CustomDomain>,
routes: Vec<Route>,
@@ -29,6 +30,7 @@ impl Router {
context: Context,
id: &str,
name: &str,
action: Action,
default_domain: &str,
custom_domains: Vec<CustomDomain>,
routes: Vec<Route>,
@@ -38,6 +40,7 @@ impl Router {
context,
id: id.to_string(),
name: name.to_string(),
action,
default_domain: default_domain.to_string(),
custom_domains,
routes,
@@ -72,7 +75,7 @@ impl Service for Router {
}
fn action(&self) -> &Action {
&Action::Create
&self.action
}
fn private_port(&self) -> Option<u16> {

View File

@@ -21,6 +21,7 @@ use crate::models::{Context, Listen, Listener, Listeners};
pub struct Router {
context: Context,
id: String,
action: Action,
name: String,
default_domain: String,
custom_domains: Vec<CustomDomain>,
@@ -33,6 +34,7 @@ impl Router {
context: Context,
id: &str,
name: &str,
action: Action,
default_domain: &str,
custom_domains: Vec<CustomDomain>,
routes: Vec<Route>,
@@ -42,6 +44,7 @@ impl Router {
context,
id: id.to_string(),
name: name.to_string(),
action,
default_domain: default_domain.to_string(),
custom_domains,
routes,
@@ -76,7 +79,7 @@ impl Service for Router {
}
fn action(&self) -> &Action {
&Action::Create
&self.action
}
fn private_port(&self) -> Option<u16> {

View File

@@ -430,6 +430,7 @@ impl Router {
context.clone(),
self.id.as_str(),
self.name.as_str(),
self.action.to_service_action(),
self.default_domain.as_str(),
custom_domains,
routes,
@@ -443,6 +444,7 @@ impl Router {
context.clone(),
self.id.as_str(),
self.name.as_str(),
self.action.to_service_action(),
self.default_domain.as_str(),
custom_domains,
routes,