Skip to content

Commit c28ea3e

Browse files
SumitYewale-Thaliajcortes
authored andcommitted
Fix: added true property for sheetId
1 parent aff2065 commit c28ea3e

File tree

2 files changed

+294
-47
lines changed

2 files changed

+294
-47
lines changed

components/csvbox/csvbox.app.mjs

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { axios } from "@pipedream/platform";
2+
import constants from "./common/constants.mjs";
23

34
export default {
45
type: "app",
@@ -8,7 +9,7 @@ export default {
89
type: "string",
910
label: "Sheet",
1011
description: "Select the sheet you want to receive data from",
11-
optional: true,
12+
optional: false,
1213
async options() {
1314
const { data } = await this.listSheets();
1415
return data.map((sheet) => ({
@@ -18,7 +19,6 @@ export default {
1819
},
1920
},
2021
},
21-
2222
methods: {
2323
_getAuthKeys() {
2424
return this.$auth.api_key;
@@ -82,34 +82,4 @@ export default {
8282
return res;
8383
},
8484
},
85-
methods: {
86-
getUrl(path) {
87-
return `https://api.csvbox.io/1.1${path}`;
88-
},
89-
getHeaders(headers) {
90-
return {
91-
"Content-Type": "application/json",
92-
"x-csvbox-api-key": `${this.$auth.api_key}`,
93-
"x-csvbox-secret-api-key": `${this.$auth.secret_api_key}`,
94-
...headers,
95-
};
96-
},
97-
_makeRequest({
98-
$ = this, path, headers, ...args
99-
} = {}) {
100-
return axios($, {
101-
debug: true,
102-
url: this.getUrl(path),
103-
headers: this.getHeaders(headers),
104-
...args,
105-
});
106-
},
107-
submitFile(args = {}) {
108-
return this._makeRequest({
109-
method: "POST",
110-
path: "/file",
111-
...args,
112-
});
113-
},
114-
},
11585
};

0 commit comments

Comments
 (0)