We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dde86d9 + 7fe35b5 commit 22dc715Copy full SHA for 22dc715
1 file changed
app/Controllers/Http/ParticipantController.js
@@ -1,6 +1,7 @@
1
'use strict'
2
3
const { keyBy } = require('lodash')
4
+const formatISO9075 = require('date-fns/formatISO9075')
5
const { ModelNotFoundException } = require('@adonisjs/lucid/src/Exceptions')
6
const { validate } = use('Validator')
7
@@ -752,6 +753,8 @@ class ParticipantController {
752
753
.firstOrFail()
754
755
const jobResultData = request.input('data')
756
+ // Add timestamp field to data so multiple iterations of the same job can be discriminated by time
757
+ jobResultData.timestamp = formatISO9075(new Date())
758
const job = ptcp.getRelated('jobs').first()
759
if (!job) {
760
throw new ModelNotFoundException(`Cannot find job with ID ${jobID} for participant ${identifier}`)
0 commit comments