Skip to content

Commit e6416fb

Browse files
committed
fix(handle-callback): setup 'updated_at' with old date on firestore
1 parent 6f6ee26 commit e6416fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/methods/handle-callback.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ const handleCallback = client => {
2828

2929
// insert application with respective authentication data
3030
if (collRef) {
31-
const firestoreTimestamp = require('firebase-admin').firestore.Timestamp.fromDate(new Date())
31+
const { Timestamp } = require('firebase-admin').firestore
3232
firestoreDoc = {
3333
application_id: application._id,
3434
application_app_id: application.app_id,
3535
application_title: application.title,
3636
authentication_id: authenticationId,
3737
authentication_permissions: JSON.stringify(authentication.permissions),
3838
store_id: storeId,
39-
created_at: firestoreTimestamp,
40-
updated_at: firestoreTimestamp
39+
created_at: Timestamp.now(),
40+
updated_at: new Timestamp(1500000000) // Jul 13 2017
4141
}
4242
} else {
4343
values = [

0 commit comments

Comments
 (0)