Skip to content
Snippets Groups Projects
Commit b519f5ab authored by Sylvain Renault's avatar Sylvain Renault
Browse files

Changed some response to Success/Error

parent 22ce0aa2
Branches main
Tags 2.0.0
No related merge requests found
openapi @ 7e50e43e
Subproject commit 073fd7213fd9e6ebc2f8a47d628a650de30c8bc4
Subproject commit 7e50e43e90a8dcd958944e8e9ceda05c7668db48
......@@ -68,7 +68,6 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
GetCapabilities200Response response = new GetCapabilities200Response();
response.Capabilities = capabilitiesList;
return new ObjectResult(response);
//return StatusCode(405, "Not supported yet!");
}
/// <summary>
......@@ -88,7 +87,6 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
GetSupport200Response response = new GetSupport200Response();
response.Capabilities = capabilitiesList;
return new ObjectResult(response);
//return StatusCode(405, "Not supported yet!");
}
}
}
......@@ -59,7 +59,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
// Notify the modules that the client need a new framerate
bool result = WorldAnalysisConnections.Singleton.ConfigureFramerate(poseConfiguration);
return result ? StatusCode(200, "Ok.") : StatusCode(405, "Not supported.");
return result ? StatusCode(200, new Success() { Message = "Ok." }) : StatusCode(405, new Error() { Message = "Not supported." });
}
/// <summary>
......@@ -142,7 +142,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
return new ObjectResult(response);
}
}
return StatusCode(404, "Not found.");
return StatusCode(404, new Error() { Message = "Not found." });
}
/// <summary>
......@@ -206,7 +206,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
info.subscription.WebhookUrl = response.WebhookUrl;
m_subscriptionsPoses.Add(info.uuidSub, info);
// todo: inform the module(s) that the client will track an anchor/trackable and need the pose
// todo: has the module to call GetRelocalizationInformation() then?!?
WorldAnalysisConnections.Singleton.SubscribeToPose(info, parentUUID);
......@@ -247,7 +247,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
// todo: inform the module(s) that the subscription changed
return StatusCode(405, "Not supported yet!");
return StatusCode(405, new Error() { Message = "Not supported yet!" });
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment