import { Request , Response } from 'express' ; import { Logger } from '@services/logger.service' ; /**
 * Manage incoming requests from api/{version}/.
 * End points of this router resolve response by itself.
 */ class MainController { description private static instance : MainController ; private constructor ( ) { } description static get ( ) { if ( ! MainController . instance ) { MainController . instance = new MainController ( ) ; } return MainController . instance ; } description param req param res async status ( req , res , next ) { res . status ( 200 ) ; res . end ( ) ; } description param req param res async report ( req , res , next ) { Logger . log ( 'error' , req . body ? `CSP Violation: ${ JSON . stringify ( req . body ) }` : 'CSP Violation' ) ; res . status ( 204 ) ; res . end ( ) ; } } const mainController = MainController . get ( ) ; export { mainController as MainController } ;