Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/graphman/src/commands/deployment/reassign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub enum ReassignDeploymentError {

#[derive(Clone, Debug)]
pub enum ReassignResult {
EmptyResponse,
Ok,
CompletedWithWarnings(Vec<String>),
}

Expand Down Expand Up @@ -121,6 +121,6 @@ pub fn reassign_deployment(
let warning_msg = format!("This is the only deployment assigned to '{}'. Please make sure that the node ID is spelled correctly.",node.as_str());
Ok(ReassignResult::CompletedWithWarnings(vec![warning_msg]))
} else {
Ok(ReassignResult::EmptyResponse)
Ok(ReassignResult::Ok)
}
}
2 changes: 1 addition & 1 deletion node/src/manager/commands/deployment/reassign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn run(
)?;

match reassign_result {
ReassignResult::EmptyResponse => {
ReassignResult::Ok => {
println!(
"Deployment {} assigned to node {}",
deployment.locator(),
Expand Down
6 changes: 2 additions & 4 deletions server/graphman/src/resolvers/deployment_mutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct DeploymentMutation;

#[derive(Clone, Debug, Union)]
pub enum ReassignResponse {
EmptyResponse(EmptyResponse),
Ok(EmptyResponse),
CompletedWithWarnings(CompletedWithWarnings),
}

Expand Down Expand Up @@ -124,9 +124,7 @@ impl DeploymentMutation {
ReassignResult::CompletedWithWarnings(warnings) => Ok(
ReassignResponse::CompletedWithWarnings(CompletedWithWarnings::new(warnings)),
),
ReassignResult::EmptyResponse => {
Ok(ReassignResponse::EmptyResponse(EmptyResponse::new()))
}
ReassignResult::Ok => Ok(ReassignResponse::Ok(EmptyResponse::new())),
}
}
}
Loading