tidy up
This commit is contained in:
parent
5538f5ff6f
commit
7b39f46507
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
|
@ -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]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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: {}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue