@cuby-ui/ar 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -151,29 +151,29 @@ public class NativeBridge extends Plugin {
151
151
  }
152
152
 
153
153
  @PluginMethod
154
- public void setJsonFile(PluginCall call) {
155
- String path = call.getString("path");
156
- if (path == null) {
157
- call.reject("Missing 'path' parameter");
154
+ public void setJsonData(PluginCall call) {
155
+ String data = call.getString("data");
156
+ if (data == null) {
157
+ call.reject("Missing 'data' parameter");
158
158
  return;
159
159
  }
160
160
 
161
161
  try {
162
- ModelData.setJsonFile(path);
162
+ ModelData.setJsonFile(data);
163
163
  JSObject ret = new JSObject();
164
164
  ret.put("status", "jsonFileSet");
165
165
  call.resolve(ret);
166
166
  } catch (Exception e) {
167
- call.reject("Failed to set JSON file path", e);
167
+ call.reject("Failed to set JSON file data", e);
168
168
  }
169
169
  }
170
170
 
171
171
  @PluginMethod
172
- public void getJsonFile(PluginCall call) {
172
+ public void getJsonData(PluginCall call) {
173
173
  try {
174
- String path = ModelData.getJsonFile();
174
+ String data = ModelData.getJsonFile();
175
175
  JSObject ret = new JSObject();
176
- ret.put("jsonPath", path);
176
+ ret.put("jsonData", data);
177
177
  call.resolve(ret);
178
178
  } catch (Exception e) {
179
179
  call.reject("Failed to get JSON file path", e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuby-ui/ar",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Ar/Vr plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",