Skip to content

Commit

Permalink
Warnings removed from typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
ashu12chi committed Nov 1, 2020
1 parent 8ad2f8e commit 39bf000
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions CloudFunctions/functions/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// @author: Ashutosh chitranshi
// Oct 10,2020
// This is used for sending push notifications using firebase

import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
admin.initializeApp();
Expand All @@ -18,15 +22,15 @@ export const sendToDevice = functions.firestore
.collection('tokens')
.get();

var community = notification.community;
let community = notification.community;
community = community.concat(',');
var postId = notification.postId;
let postId = notification.postId;
postId = postId.concat(',');
var id = community.concat(postId.toString());
var name = notification.creator;
var id2 = id.concat(name.toString());
let id = community.concat(postId.toString());
let name = notification.creator;
let id2 = id.concat(name.toString());

const tokens = querySnapshot.docs.map(snap => snap.id);
const tokens = querySnapshot.docs.map(snap => snap.id);

const payload: admin.messaging.MessagingPayload = {
notification: {
Expand Down Expand Up @@ -58,7 +62,7 @@ export const sendToDevicePendingUser = functions.firestore
.collection('tokens')
.get();

var community = notification.community;
let community = notification.community;

const tokens = querySnapshot.docs.map(snap => snap.id);

Expand Down

0 comments on commit 39bf000

Please sign in to comment.