Send some extra data to the editor data object

This commit is contained in:
Luck 2017-09-05 14:54:22 +01:00
parent 8faa4d137b
commit bf7a708440
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -85,8 +85,11 @@ public class HolderEditor<T extends PermissionHolder> extends SubCommand<T> {
JsonObject data = new JsonObject(); JsonObject data = new JsonObject();
Set<NodeModel> nodes = holder.getEnduringNodes().values().stream().map(NodeModel::fromNode).collect(Collectors.toCollection(LinkedHashSet::new)); Set<NodeModel> nodes = holder.getEnduringNodes().values().stream().map(NodeModel::fromNode).collect(Collectors.toCollection(LinkedHashSet::new));
data.add("nodes", serializePermissions(nodes));
data.addProperty("who", id(holder)); data.addProperty("who", id(holder));
data.addProperty("cmdAlias", label);
data.addProperty("uploadedBy", sender.getName());
data.addProperty("time", System.currentTimeMillis());
data.add("nodes", serializePermissions(nodes));
String dataUrl = paste(new GsonBuilder().setPrettyPrinting().create().toJson(data)); String dataUrl = paste(new GsonBuilder().setPrettyPrinting().create().toJson(data));
if (dataUrl == null) { if (dataUrl == null) {