Fix remove unused status of data config (#988)

* Removed unused status from data config endpoint
* Removed unused paramter from test
* Formating fixes
* Fixed comments after review

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
This commit is contained in:
Alexander Dobler
2020-08-26 09:59:44 +02:00
committed by GitHub
parent 9f3ff40658
commit fe8569593e
6 changed files with 59 additions and 87 deletions

View File

@@ -575,13 +575,11 @@ public abstract class JsonBuilder {
}
public static JSONObject configData(final String id, final Map<String, String> attributes, final String execution)
throws JSONException {
return configData(id, attributes, execution, null);
public static JSONObject configData(final Map<String, String> attributes) throws JSONException {
return configData(attributes, null);
}
public static JSONObject configData(final String id, final Map<String, String> attributes, final String execution,
final String mode) throws JSONException {
public static JSONObject configData(final Map<String, String> attributes, final String mode) throws JSONException {
final JSONObject data = new JSONObject();
attributes.entrySet().forEach(entry -> {
@@ -592,10 +590,7 @@ public abstract class JsonBuilder {
}
});
final JSONObject json = new JSONObject().put("id", id).put("time", "20140511T121314")
.put("status", new JSONObject().put("execution", execution)
.put("result", new JSONObject().put("finished", "success")).put("details", new JSONArray()))
.put("data", data);
final JSONObject json = new JSONObject().put("data", data);
if (mode != null) {
json.put("mode", mode);
}