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.

28 lines (23 loc) 693 B
import { RequestHandler } from 'express' import { Services } from '../../../../types/Services' import UserReportsListUtils from '../../../../components/user-reports/utils' export default class AsyncController { layoutPath: string services: Services constructor(layoutPath: string, services: Services) { this.layoutPath = layoutPath this.services = services } POST: RequestHandler = async (req, res, next) => { try { const response = await UserReportsListUtils.updateExpiredStatus({ req, res, services: this.services, }) res.send({ isExpired: response }) } catch (error) { res.send({ status: 'FAILED' }) } } }