diff --git a/src/components/EventForm.vue b/src/components/EventForm.vue index 5c0501ef86bf05a1f4a1b5d18e94f8cbbcda0e72..79f7bf549ed3691203c01c28fc8a48b9d58345b0 100644 --- a/src/components/EventForm.vue +++ b/src/components/EventForm.vue @@ -144,8 +144,8 @@ export default { if (success) { // Turn place name into coordinates to save in db await this.geocodeLocation() - // Need to turn array into object before saving to db - this.eventData['friends'] = this.friendsObject + this.eventData['friends'] = this.friendsObject // turn array into object + this.eventData['timestamp'] = Date.now() // add timestamp // Save eventData object under events node in db this.firebaseSubmitEvent(this.eventData) this.$emit('submitted') diff --git a/src/components/SignalForm.vue b/src/components/SignalForm.vue index 8c7ae585c1c5790773cb6a9a8e0dffba0fb2f5c8..6b75daa3adbded4e84507d11b389fd517aa9c991 100644 --- a/src/components/SignalForm.vue +++ b/src/components/SignalForm.vue @@ -52,7 +52,7 @@ export default { submitSignal() { this.$refs.signalForm.validate().then(success => { if (success) { - this.firebaseSendSignal({ type: this.signalType, details: this.details }) + this.firebaseSendSignal({ type: this.signalType, details: this.details, timestamp: Date.now() }) this.$emit('submitted') } })