Skip to content

Commit 478a327

Browse files
committed
update: type changes to support firebase-admin node.js
1 parent a1d2859 commit 478a327

13 files changed

Lines changed: 3644 additions & 2359 deletions

integration/functions/index.js

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ const functions = require('firebase-functions');
22
const admin = require('firebase-admin');
33
admin.initializeApp();
44

5+
const geofirex = require('geofirex');
6+
const geo = geofirex.init(firebase);
7+
8+
console.log(geo)
9+
510
exports.dbWrite = functions.firestore
611
.document('/positions/{docId}')
712
.onCreate((change, context) => {
@@ -24,38 +29,3 @@ function delay(t) {
2429
setTimeout(resolve.bind(null, null), t);
2530
});
2631
}
27-
28-
// "use strict";
29-
// var __awaiter = (this && this.__awaiter) || function(thisArg, _arguments, P, generator) {
30-
// return new(P || (P = Promise))(function(resolve, reject) {
31-
// function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32-
33-
// function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
34-
35-
// function step(result) { result.done ? resolve(result.value) : new P(function(resolve) { resolve(result.value); }).then(fulfilled, rejected); }
36-
// step((generator = generator.apply(thisArg, _arguments || [])).next());
37-
// });
38-
// };
39-
// Object.defineProperty(exports, "__esModule", { value: true });
40-
// const functions = require("firebase-functions");
41-
// const admin = require("firebase-admin");
42-
// admin.initializeApp();
43-
// exports.dbWrite = functions.firestore
44-
// .document('/positions/{docId}')
45-
// .onCreate((change, context) => __awaiter(this, void 0, void 0, function*() {
46-
// const docId = context.params.docId;
47-
// if (!docId.includes('testPoint'))
48-
// return;
49-
// yield delay(15000);
50-
// return admin
51-
// .firestore()
52-
// .doc('positions/' + docId)
53-
// .delete();
54-
// }));
55-
56-
// function delay(t) {
57-
// return new Promise(function(resolve) {
58-
// setTimeout(resolve.bind(null, null), t);
59-
// });
60-
// }
61-
// //# sourceMappingURL=index.js.map

0 commit comments

Comments
 (0)