diff options
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js new file mode 100644 index 000000000..0b401dcb2 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js @@ -0,0 +1,27 @@ +"use strict"; + +var ReportService = function ( $http ) { + + return { + + getReportData: function(requestInfo) { + return $http.post("error-report",requestInfo); + }, + + getReportTimeStamp: function () { + const today = new Date(); + const se = String(today.getSeconds()).padStart(2, '0'); + const mi = String(today.getMinutes()).padStart(2, '0'); + const hr = String(today.getHours()).padStart(2, '0'); + const dd = String(today.getDate()).padStart(2, '0'); + const mm = String(today.getMonth() + 1).padStart(2, '0'); + const yyyy = today.getFullYear(); + + return hr + '-' + mi + '-' + se + "_" + dd + '-' + mm + '-' + yyyy; + } + + } + +}; + +appDS2.factory("ReportService", ["$http", ReportService]);
\ No newline at end of file |