mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-15 15:50:38 +08:00
node: Add track/untrack support
Signed-off-by: Slack Coder <slackcoder@server.ky>
This commit is contained in:
@@ -86,9 +86,11 @@ pub enum FetchResult {
|
||||
/// Commands sent to the protocol by the operator.
|
||||
#[derive(Debug)]
|
||||
pub enum Command {
|
||||
AnnounceRefsUpdate(ProjId),
|
||||
Connect(net::SocketAddr),
|
||||
Fetch(ProjId, chan::Sender<FetchLookup>),
|
||||
AnnounceRefsUpdate(ProjId),
|
||||
Track(ProjId, chan::Sender<bool>),
|
||||
Untrack(ProjId, chan::Sender<bool>),
|
||||
}
|
||||
|
||||
/// Command-related errors.
|
||||
@@ -412,6 +414,12 @@ where
|
||||
}
|
||||
}
|
||||
}
|
||||
Command::Track(proj, resp) => {
|
||||
resp.send(self.track(proj)).ok();
|
||||
}
|
||||
Command::Untrack(proj, resp) => {
|
||||
resp.send(self.untrack(proj)).ok();
|
||||
}
|
||||
Command::AnnounceRefsUpdate(proj) => {
|
||||
let user = *self.storage.user_id();
|
||||
let repo = self.storage.repository(&proj).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user