@andersonalmeidax0/webcomponents 0.1.20 → 0.1.21

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.
package/RestAPIAdapter.js CHANGED
@@ -136,7 +136,7 @@ X-Colocar o MetalMarlek em outro server AWS ... com docker... com outra conta de
136
136
 
137
137
  var {method,url,body}=this.getParams(q,vo,this.tableName,filter);
138
138
  //server is optional
139
- url = this.urlServer==null?url:this.urlServer+url;
139
+ url = (this.urlServer==null)?url:this.urlServer+url;
140
140
 
141
141
  const response = await this.myFetch3(ptoken,url,method,body);
142
142
  if (!response.ok) {
@@ -176,10 +176,10 @@ X-Colocar o MetalMarlek em outro server AWS ... com docker... com outra conta de
176
176
  *
177
177
  *********************** */
178
178
  async uploadFile(fileData) {
179
- alert('UPLOAD start');
179
+ alert('UPLOAD start:'+this.urlServer+'/upload');
180
180
  let formData = new FormData();
181
181
  formData.append('file', fileData);
182
- const response = await fetch(urlAPI+'/api/upload', {
182
+ const response = await fetch(this.urlServer+'/upload', {
183
183
  method: 'POST',
184
184
  body: formData,
185
185
  })
@@ -199,7 +199,8 @@ X-Colocar o MetalMarlek em outro server AWS ... com docker... com outra conta de
199
199
 
200
200
 
201
201
  async download(fname) {
202
- var response=await fetch(urlAPI+'/api/download/'+fname, {
202
+ alert('UPLOAD start:'+this.urlServer+'/download/'+fname);
203
+ var response=await fetch(this.urlServer+'/download/'+fname, {
203
204
  method: 'GET'
204
205
  })
205
206
  if (!response.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andersonalmeidax0/webcomponents",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "webcomponents",
5
5
  "main": "webcomponents",
6
6
  "scripts": {