Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
fix(stats): firestore data fields updated #18
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Sep 5, 2020
1 parent 81dd498 commit a34a5c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ const admin = require('firebase-admin');

const docRef = db.collection('usersGitHub').doc(author.id.toString());
await docRef.set({
...author,
[type]: admin.firestore.FieldValue.increment(1)
author,
id: author.id.toString(),
[type]: admin.firestore.FieldValue.increment(1),
}, { merge: true });
} catch (error) {
core.setFailed(error.message);
Expand Down

0 comments on commit a34a5c3

Please sign in to comment.