tidy up
This commit is contained in:
parent
85d672c5d7
commit
328aef00e1
|
@ -46,7 +46,6 @@ exports.strategyFactory = async function (
|
|||
clientID: config.clientID,
|
||||
clientSecret: config.clientSecret,
|
||||
callbackURL: callbackUrl,
|
||||
store: true,
|
||||
},
|
||||
verify
|
||||
)
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
||||
|
|
|
@ -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: {}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue