mirror of
https://github.com/directus/directus.git
synced 2026-02-07 23:55:07 -05:00
11 lines
330 B
TypeScript
11 lines
330 B
TypeScript
import { RequestHandler } from 'express';
|
|
import asyncHandler from '../utils/async-handler';
|
|
import { getSchema } from '../utils/get-schema';
|
|
|
|
const schema: RequestHandler = asyncHandler(async (req, res, next) => {
|
|
req.schema = await getSchema({ accountability: req.accountability });
|
|
return next();
|
|
});
|
|
|
|
export default schema;
|