backend-manager 2.4.8 → 2.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -21,9 +21,13 @@ Module.prototype.main = function () {
|
|
|
21
21
|
if (!payload.user.roles.admin) {
|
|
22
22
|
return reject(assistant.errorManager(`Admin required.`, {code: 401, sentry: false, send: false, log: false}).error)
|
|
23
23
|
} else {
|
|
24
|
-
const client = new self.libraries.admin.firestore.v1.FirestoreAdminClient({
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const client = new self.libraries.admin.firestore.v1.FirestoreAdminClient({
|
|
25
|
+
credential: Manager.libraries.admin.credential.cert(
|
|
26
|
+
require(Manager.project.serviceAccountPath)
|
|
27
|
+
),
|
|
28
|
+
});
|
|
29
|
+
const projectId = Manager.project.projectId;
|
|
30
|
+
const resourceZone = Manager.project.resourceZone;
|
|
27
31
|
const databaseName = client.databasePath(projectId, '(default)');
|
|
28
32
|
const bucketName = `bm-backup-firestore-${projectId}`;
|
|
29
33
|
const bucketAddress = `gs://${bucketName}`;
|
package/src/manager/index.js
CHANGED
|
@@ -63,14 +63,6 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
63
63
|
Analytics: null,
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// Manager inner variables
|
|
67
|
-
// self._inner = {
|
|
68
|
-
// ip: '',
|
|
69
|
-
// country: '',
|
|
70
|
-
// referrer: '',
|
|
71
|
-
// userAgent: '',
|
|
72
|
-
// };
|
|
73
|
-
|
|
74
66
|
// Set properties
|
|
75
67
|
self.cwd = process.cwd();
|
|
76
68
|
|