Skip to content

Commit

Permalink
Save timestamp with RSVPs
Browse files Browse the repository at this point in the history
  • Loading branch information
JHWelch committed Aug 29, 2023
1 parent b32414d commit c2cd9a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions __tests__/controllers/rsvpController.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ describe('store', () => {
name: 'test name',
email: 'test@example.com',
plusOne: true,
createdAt: expect.anything(), // Timestamp is off
}
)
})
Expand Down
2 changes: 2 additions & 0 deletions __tests__/data/firestore/firestoreAdapter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { initializeApp } from 'firebase/app'
import { applicationDefault } from 'firebase-admin/app'
import FirestoreAdapter from '../../../src/data/firestore/firestoreAdapter'
import {
Timestamp,
addDoc,
getFirestore,
query,
Expand Down Expand Up @@ -210,6 +211,7 @@ describe('createRsvp', () => {
name: 'test name',
email: 'test@example.com',
plusOne: true,
createdAt: Timestamp.now(),
}
)
})
Expand Down
1 change: 1 addition & 0 deletions src/data/firestore/firestoreAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default class FirestoreAdapter {
name,
email,
plusOne,
createdAt: Timestamp.now(),
})
}

Expand Down

0 comments on commit c2cd9a5

Please sign in to comment.