mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Replace express-async-handler for a local function.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { RequestHandler } from 'express';
|
||||
import asyncHandler from 'express-async-handler';
|
||||
import { Request, RequestHandler, Response } from 'express';
|
||||
import asyncHandler from '../utils/async-handler';
|
||||
import env from '../env';
|
||||
import { getCacheKey } from '../utils/get-cache-key';
|
||||
import cache from '../cache';
|
||||
@@ -7,7 +7,7 @@ import { Transform, transforms } from 'json2csv';
|
||||
import { PassThrough } from 'stream';
|
||||
import ms from 'ms';
|
||||
|
||||
export const respond: RequestHandler = asyncHandler(async (req, res) => {
|
||||
export const respond: RequestHandler = asyncHandler(async (req: Request, res: Response) => {
|
||||
if (
|
||||
req.method.toLowerCase() === 'get' &&
|
||||
env.CACHE_ENABLED === true &&
|
||||
|
||||
Reference in New Issue
Block a user