@jd-data-limited/easy-fm 1.0.2-alpha4 → 1.0.2-alpha6
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/index.js +4 -4
- package/index.ts +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -108,7 +108,7 @@ export default class FileMakerConnection {
|
|
|
108
108
|
return db.pairHost(this, con);
|
|
109
109
|
});
|
|
110
110
|
if (this.databaseConDetails[0].method === "filemaker") {
|
|
111
|
-
fetch(`${this.endpoint}/sessions`, {
|
|
111
|
+
fetch(`${this.databases[0].endpoint}/sessions`, {
|
|
112
112
|
hostname: this.hostname,
|
|
113
113
|
port: 443,
|
|
114
114
|
method: "POST",
|
|
@@ -138,7 +138,7 @@ export default class FileMakerConnection {
|
|
|
138
138
|
resolve(this.token);
|
|
139
139
|
}
|
|
140
140
|
else if (this.databaseConDetails[0].method === "oauth") {
|
|
141
|
-
fetch(`${this.endpoint}/sessions`, {
|
|
141
|
+
fetch(`${this.databases[0].endpoint}/sessions`, {
|
|
142
142
|
method: "POST",
|
|
143
143
|
headers: {
|
|
144
144
|
"Content-Type": "application/json",
|
|
@@ -157,7 +157,7 @@ export default class FileMakerConnection {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
else if (this.databaseConDetails[0].method === "claris") {
|
|
160
|
-
fetch(`${this.endpoint}/sessions`, {
|
|
160
|
+
fetch(`${this.databases[0].endpoint}/sessions`, {
|
|
161
161
|
method: "POST",
|
|
162
162
|
headers: {
|
|
163
163
|
"Content-Type": "application/json",
|
|
@@ -181,7 +181,7 @@ export default class FileMakerConnection {
|
|
|
181
181
|
return this._token;
|
|
182
182
|
}
|
|
183
183
|
get endpoint() {
|
|
184
|
-
return `https://${this.hostname}/fmi/data/v2/databases
|
|
184
|
+
return `https://${this.hostname}/fmi/data/v2/databases`;
|
|
185
185
|
}
|
|
186
186
|
apiRequest(url, options = {}) {
|
|
187
187
|
return __awaiter(this, void 0, void 0, function* () {
|
package/index.ts
CHANGED
|
@@ -194,7 +194,7 @@ export default class FileMakerConnection {
|
|
|
194
194
|
})
|
|
195
195
|
|
|
196
196
|
if (this.databaseConDetails[0].method === "filemaker") {
|
|
197
|
-
fetch(`${this.endpoint}/sessions`, {
|
|
197
|
+
fetch(`${this.databases[0].endpoint}/sessions`, {
|
|
198
198
|
hostname: this.hostname,
|
|
199
199
|
port: 443,
|
|
200
200
|
method: "POST",
|
|
@@ -221,7 +221,7 @@ export default class FileMakerConnection {
|
|
|
221
221
|
this._token = (<loginOptionsToken>this.databaseConDetails[0]).token
|
|
222
222
|
resolve(this.token)
|
|
223
223
|
} else if (this.databaseConDetails[0].method === "oauth") {
|
|
224
|
-
fetch(`${this.endpoint}/sessions`, {
|
|
224
|
+
fetch(`${this.databases[0].endpoint}/sessions`, {
|
|
225
225
|
method: "POST",
|
|
226
226
|
headers: {
|
|
227
227
|
"Content-Type": "application/json",
|
|
@@ -239,7 +239,7 @@ export default class FileMakerConnection {
|
|
|
239
239
|
resolve(this.token)
|
|
240
240
|
})
|
|
241
241
|
} else if (this.databaseConDetails[0].method === "claris") {
|
|
242
|
-
fetch(`${this.endpoint}/sessions`, {
|
|
242
|
+
fetch(`${this.databases[0].endpoint}/sessions`, {
|
|
243
243
|
method: "POST",
|
|
244
244
|
headers: {
|
|
245
245
|
"Content-Type": "application/json",
|
|
@@ -266,7 +266,7 @@ export default class FileMakerConnection {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
get endpoint(): string {
|
|
269
|
-
return `https://${this.hostname}/fmi/data/v2/databases
|
|
269
|
+
return `https://${this.hostname}/fmi/data/v2/databases`
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
async apiRequest(url: string | Request, options: any = {}): Promise<any> {
|