Added the ability to remove routes from router.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
@@ -56,6 +56,7 @@ pub enum RegMsg {
|
||||
Error(MTTError),
|
||||
GetNameID(Name),
|
||||
Ok,
|
||||
RemoveRoute(Route),
|
||||
RemoveSender(SenderID),
|
||||
RouteID(RouteID),
|
||||
}
|
||||
@@ -564,6 +565,11 @@ impl DocRegistry {
|
||||
self.routes.remove_sender_id(sender_id);
|
||||
reg.response(RegMsg::Ok)
|
||||
}
|
||||
RegMsg::RemoveRoute(route) => {
|
||||
self.routes
|
||||
.remove_route(route.clone(), reg.get_sender_id().clone());
|
||||
reg.response(RegMsg::Ok)
|
||||
}
|
||||
_ => reg.response(RegMsg::Ok),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user