@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taruvi/sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Taruvi SDK",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -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(fullUrl, this.body)
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(fullUrl, this.body)
70
+ return await this.client.httpClient.put(url, this.body)
71
71
 
72
72
  case HttpMethod.DELETE:
73
- return await this.client.httpClient.delete(fullUrl)
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(fullUrl)
77
+ return await this.client.httpClient.get(url)
78
78
  }
79
79
  }
80
80
  }