This commit is contained in:
Martin McKeaveney 2022-01-18 17:41:38 +01:00
parent 85d672c5d7
commit 328aef00e1
4 changed files with 11 additions and 6 deletions

View File

@ -46,7 +46,6 @@ exports.strategyFactory = async function (
clientID: config.clientID,
clientSecret: config.clientSecret,
callbackURL: callbackUrl,
store: true,
},
verify
)

View File

@ -38,6 +38,13 @@ exports.fetch = async function (ctx) {
)
).rows.map(row => row.doc)
for (let datasource of datasources) {
if (datasource.config && datasource.config.auth) {
// strip secrets from response so they don't show in the network request
delete datasource.config.auth
}
}
ctx.body = [bbInternalDb, ...datasources]
}

View File

@ -87,8 +87,7 @@ export interface ExtraQueryConfig {
export interface Integration {
docs: string
plus?: boolean
// TODO: use a proper type here
auth?: { type: "google" }
auth?: { type: string }
description: string
friendlyName: string
datasource: {}

View File

@ -248,11 +248,11 @@ module GoogleSheetsModule {
}
}
async deleteTable(query: any) {
async deleteTable(sheet: any) {
try {
await this.connect()
const sheet = await this.client.sheetsByTitle[query.sheet]
return await sheet.delete()
const sheetToDelete = await this.client.sheetsByTitle[sheet]
return await sheetToDelete.delete()
} catch (err) {
console.error("Error deleting table in google sheets", err)
throw err