turn on gsheets

This commit is contained in:
Martin McKeaveney 2022-10-10 09:02:17 +01:00
parent c2cd2af494
commit 2855fbea66
2 changed files with 1 additions and 12 deletions

View File

@ -1,17 +1,9 @@
const { getDefinitions } = require("../../integrations") const { getDefinitions } = require("../../integrations")
const { SourceName } = require("@budibase/types")
const googlesheets = require("../../integrations/googlesheets")
const { featureFlags } = require("@budibase/backend-core")
exports.fetch = async function (ctx) { exports.fetch = async function (ctx) {
ctx.status = 200 ctx.status = 200
const defs = await getDefinitions() const defs = await getDefinitions()
// for google sheets integration google verification
if (featureFlags.isEnabled(featureFlags.TenantFeatureFlag.GOOGLE_SHEETS)) {
defs[SourceName.GOOGLE_SHEETS] = googlesheets.schema
}
ctx.body = defs ctx.body = defs
} }

View File

@ -33,6 +33,7 @@ const DEFINITIONS: { [key: string]: Integration } = {
[SourceName.ARANGODB]: arangodb.schema, [SourceName.ARANGODB]: arangodb.schema,
[SourceName.REST]: rest.schema, [SourceName.REST]: rest.schema,
[SourceName.FIRESTORE]: firebase.schema, [SourceName.FIRESTORE]: firebase.schema,
[SourceName.GOOGLE_SHEETS]: googlesheets.schema,
[SourceName.REDIS]: redis.schema, [SourceName.REDIS]: redis.schema,
[SourceName.SNOWFLAKE]: snowflake.schema, [SourceName.SNOWFLAKE]: snowflake.schema,
} }
@ -66,10 +67,6 @@ if (
INTEGRATIONS[SourceName.ORACLE] = oracle.integration INTEGRATIONS[SourceName.ORACLE] = oracle.integration
} }
if (environment.SELF_HOSTED) {
DEFINITIONS[SourceName.GOOGLE_SHEETS] = googlesheets.schema
}
module.exports = { module.exports = {
getDefinitions: async () => { getDefinitions: async () => {
const pluginSchemas: { [key: string]: Integration } = {} const pluginSchemas: { [key: string]: Integration } = {}