Skip to content
Snippets Groups Projects
Commit a8304861 authored by Endrizzi, Marco (UG - Comp Sci & Elec Eng)'s avatar Endrizzi, Marco (UG - Comp Sci & Elec Eng)
Browse files

Added timestamps

parent 242cd2bc
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
......@@ -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')
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment