Skip to content
Snippets Groups Projects
Commit 3137a81f authored by Sören Henning's avatar Sören Henning
Browse files

Fix Firestore database name access

parent 37e170d8
No related branches found
No related tags found
1 merge request!250Refactor Beam service
Pipeline #6798 passed
...@@ -34,7 +34,7 @@ final class DocumentMapper extends SimpleFunction<ActivePowerRecord, Document> { ...@@ -34,7 +34,7 @@ final class DocumentMapper extends SimpleFunction<ActivePowerRecord, Document> {
private String createDocumentName(final String documentId) { private String createDocumentName(final String documentId) {
this.initFirestoreConfig(); this.initFirestoreConfig();
return "projects/" + this.firestoreConfig.getProjectId() return "projects/" + this.firestoreConfig.getProjectId()
+ "/databases/" + this.firestoreConfig.getDatabaseDdlRequest() + "/databases/" + this.firestoreConfig.getDatabase()
+ "/documents/" + this.collection + "/documents/" + this.collection
+ "/" + documentId; + "/" + documentId;
} }
......
...@@ -16,8 +16,8 @@ final class FirestoreConfig { ...@@ -16,8 +16,8 @@ final class FirestoreConfig {
return this.firestoreOptions.getProjectId(); return this.firestoreOptions.getProjectId();
} }
public String getDatabaseDdlRequest() { public String getDatabase() {
return this.firestoreOptions.getProjectId(); return this.firestoreOptions.getDatabaseId();
} }
public static FirestoreConfig createFromDefaults() throws IOException { public static FirestoreConfig createFromDefaults() throws IOException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment