@andersonalmeidax0/webcomponents 0.1.3 → 0.1.5
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
|
@@ -81,7 +81,8 @@ function getStorageWithExpiry(key) {
|
|
|
81
81
|
urlServer;
|
|
82
82
|
tagData;
|
|
83
83
|
/** ***********************
|
|
84
|
-
*
|
|
84
|
+
* tableName is entity (after server)
|
|
85
|
+
* Server is option (can be null for local API ou not for remote APIs)
|
|
85
86
|
*********************** */
|
|
86
87
|
constructor(tableName,urlServer,tagData,token,pnewVO) {
|
|
87
88
|
|
|
@@ -132,8 +133,10 @@ function getStorageWithExpiry(key) {
|
|
|
132
133
|
//if(ptoken==null)
|
|
133
134
|
// throw new PlatAPIAuthError( `An error has occured: ${response.status}`);
|
|
134
135
|
|
|
135
|
-
var {method,url,body}=this.getParams(q,vo,
|
|
136
|
-
|
|
136
|
+
var {method,url,body}=this.getParams(q,vo,"/"+this.tableName,filter);
|
|
137
|
+
//server is optional
|
|
138
|
+
url = this.urlServer==null?url:this.urlServer+url;
|
|
139
|
+
|
|
137
140
|
const response = await this.myFetch3(ptoken,url,method,body);
|
|
138
141
|
if (!response.ok) {
|
|
139
142
|
if(response.status===404)
|
|
@@ -14,8 +14,8 @@ import { XFormEdit } from "./XFormEdit.jsx";
|
|
|
14
14
|
//import { JZInPlaceListComponent } from "./JZInPlaceListComponent.jsx";
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "
|
|
18
|
-
import {ErrorConstants} from "
|
|
17
|
+
import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "../Errors.js";
|
|
18
|
+
import {ErrorConstants} from "../Errors.js";
|
|
19
19
|
import { ErrorCard } from "./ErrorCard";
|
|
20
20
|
import { ErrorCardAuth } from "./ErrorCardAuth";
|
|
21
21
|
|
|
@@ -15,7 +15,7 @@ import { JZEditComponent } from "./JZEditComponent.jsx";
|
|
|
15
15
|
import { JZInPlaceListComponent } from "./JZInPlaceListComponent.jsx";
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "
|
|
18
|
+
import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "../Errors.js";
|
|
19
19
|
import { ErrorCard } from "./ErrorCard";
|
|
20
20
|
import { ErrorCardAuth } from "./ErrorCardAuth";
|
|
21
21
|
|
package/package.json
CHANGED
package/releasenotes.txt
CHANGED
|
File without changes
|