@taruvi/sdk 1.0.1 → 1.0.2
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/package.json
CHANGED
|
@@ -55,26 +55,26 @@ export class Database {
|
|
|
55
55
|
async execute() {
|
|
56
56
|
// Build the API URL
|
|
57
57
|
const url = this.buildRoute()
|
|
58
|
-
const fullUrl = `sites/eox_site/${url}` //remove for productions because baseurl is in the appscope, no need for site
|
|
58
|
+
// const fullUrl = `sites/eox_site/${url}` //remove for productions because baseurl is in the appscope, no need for site
|
|
59
59
|
|
|
60
60
|
const operation = this.operation || HttpMethod.GET
|
|
61
61
|
|
|
62
62
|
switch (operation) {
|
|
63
63
|
case HttpMethod.POST:
|
|
64
|
-
return await this.client.httpClient.post(
|
|
64
|
+
return await this.client.httpClient.post(url, this.body)
|
|
65
65
|
|
|
66
66
|
case HttpMethod.PUT:
|
|
67
67
|
if (!this.urlParams.recordId) {
|
|
68
68
|
throw new Error('PUT operation requires a record ID. Use .get(recordId) before .update()')
|
|
69
69
|
}
|
|
70
|
-
return await this.client.httpClient.put(
|
|
70
|
+
return await this.client.httpClient.put(url, this.body)
|
|
71
71
|
|
|
72
72
|
case HttpMethod.DELETE:
|
|
73
|
-
return await this.client.httpClient.delete(
|
|
73
|
+
return await this.client.httpClient.delete(url)
|
|
74
74
|
|
|
75
75
|
case HttpMethod.GET:
|
|
76
76
|
default:
|
|
77
|
-
return await this.client.httpClient.get(
|
|
77
|
+
return await this.client.httpClient.get(url)
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|