1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00
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, clientID: config.clientID,
clientSecret: config.clientSecret, clientSecret: config.clientSecret,
callbackURL: callbackUrl, callbackURL: callbackUrl,
store: true,
}, },
verify verify
) )

View file

@ -38,6 +38,13 @@ exports.fetch = async function (ctx) {
) )
).rows.map(row => row.doc) ).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] ctx.body = [bbInternalDb, ...datasources]
} }

View file

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

View file

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