forked from external-repos/pa11y-dashboard
Add presenters for tasks and results
This commit is contained in:
16
view/presenter/result.js
Normal file
16
view/presenter/result.js
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = presentResult;
|
||||
|
||||
function presentResult (result) {
|
||||
|
||||
// Add additional info
|
||||
result.href = '/' + result.task + '/' + result.id;
|
||||
result.hrefCsv = '/' + result.task + '/' + result.id + '.csv';
|
||||
result.hrefJson = '/' + result.task + '/' + result.id + '.json';
|
||||
|
||||
// Parse date
|
||||
result.date = new Date(result.date);
|
||||
|
||||
return result;
|
||||
}
|
Reference in New Issue
Block a user