Skip to content

Commit

Permalink
fix(handle-callback): setup 'updated_at' with old date on firestore
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Apr 27, 2020
1 parent 6f6ee26 commit e6416fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/methods/handle-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ const handleCallback = client => {

// insert application with respective authentication data
if (collRef) {
const firestoreTimestamp = require('firebase-admin').firestore.Timestamp.fromDate(new Date())
const { Timestamp } = require('firebase-admin').firestore
firestoreDoc = {
application_id: application._id,
application_app_id: application.app_id,
application_title: application.title,
authentication_id: authenticationId,
authentication_permissions: JSON.stringify(authentication.permissions),
store_id: storeId,
created_at: firestoreTimestamp,
updated_at: firestoreTimestamp
created_at: Timestamp.now(),
updated_at: new Timestamp(1500000000) // Jul 13 2017
}
} else {
values = [
Expand Down

0 comments on commit e6416fb

Please sign in to comment.