mirror of
https://github.com/mdanics/fluttergram.git
synced 2026-03-13 10:41:54 +08:00
change userRecord.data to userRecord.data() (#114)
* change userRecord.data to userRecord.data() because userRecord.data is always not null. * on my windows 10, notificationHandler and getFeed can be accessed by adding /lib/ folder.
This commit is contained in:
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const functions = require("firebase-functions");
|
||||
const admin = require("firebase-admin");
|
||||
const notificationHandler_1 = require("./notificationHandler");
|
||||
const getFeed_1 = require("./getFeed");
|
||||
const notificationHandler_1 = require("./lib/notificationHandler");
|
||||
const getFeed_1 = require("./lib/getFeed");
|
||||
admin.initializeApp();
|
||||
exports.notificationHandler = functions.firestore.document("/insta_a_feed/{userId}/items/{activityFeedItem}")
|
||||
.onCreate((snapshot, context) => __awaiter(this, void 0, void 0, function* () {
|
||||
|
||||
@@ -100,7 +100,7 @@ Future<void> tryCreateUserRecord(BuildContext context) async {
|
||||
return null;
|
||||
}
|
||||
DocumentSnapshot userRecord = await ref.doc(user.id).get();
|
||||
if (userRecord.data == null) {
|
||||
if (userRecord.data() == null) {
|
||||
// no user record exists, time to create
|
||||
|
||||
String userName = await Navigator.push(
|
||||
|
||||
Reference in New Issue
Block a user