1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Adding back a base column for sheet creation.

This commit is contained in:
mike12345567 2023-03-13 18:10:35 +00:00
parent 4eba548e93
commit 65ada7f8b2

View file

@ -308,9 +308,12 @@ class GoogleSheetsIntegration implements DatasourcePlus {
}
async createTable(name?: string) {
if (!name) {
throw new Error("Must provide name for new sheet.")
}
try {
await this.connect()
return await this.client.addSheet({ title: name, headerValues: [] })
return await this.client.addSheet({ title: name, headerValues: [name] })
} catch (err) {
console.error("Error creating new table in google sheets", err)
throw err