feat: point field localization and graphql

This commit is contained in:
Dan Ribbens
2021-08-24 17:28:08 -04:00
parent 7504155e17
commit 30f17509ea
12 changed files with 174 additions and 33 deletions

View File

@@ -1,8 +1,9 @@
const bindCollectionMiddleware = (collection) => {
return (req, res, next) => {
req.collection = collection;
next();
};
import { NextFunction, Response } from 'express';
import { PayloadRequest } from '../express/types';
const bindCollectionMiddleware = (collection: string) => (req: PayloadRequest, res: Response, next: NextFunction) => {
req.collection = collection;
next();
};
export default bindCollectionMiddleware;