UNPKG

@ministryofjustice/hmpps-digital-prison-reporting-frontend

Version:

The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.

19 lines (15 loc) 518 B
import { RequestHandler } from 'express' import { Services } from '../../../../types/Services' import LocalsHelper from '../../../../utils/localsHelper' export default class RequestedReportsController { services: Services constructor(services: Services) { this.services = services } DELETE: RequestHandler = async (req, res) => { const { userId } = LocalsHelper.getValues(res) const { id } = req.params await this.services.requestedReportService.removeReport(id, userId) res.end() } }