@@ -2,6 +2,11 @@ const functions = require('firebase-functions');
22const admin = require ( 'firebase-admin' ) ;
33admin . initializeApp ( ) ;
44
5+ const geofirex = require ( 'geofirex' ) ;
6+ const geo = geofirex . init ( firebase ) ;
7+
8+ console . log ( geo )
9+
510exports . 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