Skip to content

Commit

Permalink
Merge pull request #36 from mapswipe/send-version-and-client-type-wit…
Browse files Browse the repository at this point in the history
…h-results

feat: send app version and client type with results to Firebase
  • Loading branch information
ofr1tz authored Oct 8, 2024
2 parents b29876c + 93ef853 commit f5d3eb9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/views/ProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { decode } from 'base-64'
import { mapStores } from 'pinia'
import { i18nRoute } from '@/i18n/translation'
import { useCurrentUserStore } from '@/stores/currentUser'
import { version } from '../../package.json'
import matchIcon from '@/utils/matchIcon'
import BasicPage from '@/components/BasicPage.vue'
import CompareProject from '@/components/CompareProject.vue'
Expand Down Expand Up @@ -55,9 +56,14 @@ export default defineComponent({
saveResults: (results, startTime) => {
const numberOfTasks = Object.keys(results).length
const endTime = new Date().toISOString()
const dev = import.meta.env.DEV
const appVersion = version + (dev ? '-dev' : '')
const clientType = 'web'
this.mappingSpeed = (Date.parse(endTime) - Date.parse(startTime)) / numberOfTasks
const entry = {
appVersion,
clientType,
endTime,
results,
startTime,
Expand Down

0 comments on commit f5d3eb9

Please sign in to comment.