[pbs-devel] [PATCH proxmox-widget-toolkit 1/1] proxy: allow setting of reader config
Hannes Laimer
h.laimer at proxmox.com
Tue Jul 5 15:08:07 CEST 2022
needed for modifying the raw data that comes from the API, not just
single items
Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
src/data/ProxmoxProxy.js | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/data/ProxmoxProxy.js b/src/data/ProxmoxProxy.js
index d4dfe22..9d0cfbf 100644
--- a/src/data/ProxmoxProxy.js
+++ b/src/data/ProxmoxProxy.js
@@ -15,12 +15,11 @@ Ext.define('Proxmox.RestProxy', {
},
constructor: function(config) {
- Ext.applyIf(config, {
- reader: {
- responseType: undefined,
- type: 'json',
- rootProperty: config.root || 'data',
- },
+ config.reader = config.reader ?? {};
+ Ext.applyIf(config.reader, {
+ responseType: undefined,
+ type: 'json',
+ rootProperty: config.root || 'data',
});
this.callParent([config]);
--
2.30.2
More information about the pbs-devel
mailing list