Skip to content

Commit 643a108

Browse files
authored
Merge pull request lowcoder-org#252 from sarike/ds-firebase
fix: add some tooltips for firebase datasource
2 parents 999d4be + d0aabc0 commit 643a108

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

server/node-service/src/plugins/firebase/dataSourceConfig.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ const dataSourceConfig = {
55
params: [
66
{
77
key: "databaseUrl",
8-
label: "Firebase Database URL",
8+
label: "Database URL",
99
tooltip:
10-
"You can find your database URL and Firestore ID in your [Firebase project console](https://console.firebase.google.com/)",
10+
"You can find your database URL and Firestore ID in your [Firebase project console](https://console.firebase.google.com/). Required for Realtime database.",
1111
type: "textInput",
1212
},
1313
{
1414
key: "firestoreId",
15-
label: "Firestore Project ID",
15+
label: "Project ID",
16+
tooltip: "Firebase project ID, Optional when the Database URL is filled.",
1617
type: "textInput",
1718
},
1819
{

server/node-service/src/plugins/firebase/run.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ export async function runFirebasePlugin(
1515
dataSourceConfig: DataSourceDataType
1616
) {
1717
const { actionName } = actionData;
18-
const { privateKey, databaseUrl } = dataSourceConfig;
18+
const { privateKey, databaseUrl, firestoreId } = dataSourceConfig;
1919
const serviceAccount = JSON.parse(privateKey);
2020

2121
const app = initializeApp({
2222
credential: cert(serviceAccount),
2323
databaseURL: databaseUrl,
24+
projectId: firestoreId,
2425
});
2526

2627
const witDbRef = <T>(fn: (ref: Reference) => T): T => {

0 commit comments

Comments
 (0)