unAuthorized method
Implementation
Future<void> unAuthorized({
Object? data,
}) async {
/// set the status code to 404
response.statusCode = io.HttpStatus.notFound;
/// append the data to the response
await json(
{
'status_code': io.HttpStatus.notFound,
'message': 'Not found',
if (data != null) 'data': data,
},
);
}