UNPKG

jsm-core

Version:
21 lines (20 loc) 644 B
import { NextFunction, Request, Response } from "express"; /** * @description Attach user to req.currentUser * @param {*} req Express req Object * @param {*} res Express res Object * @param {*} next Express next Function */ declare const getAttachAuthDataMiddleware: ({ usersService, }: { usersService?: { getById: (id: string, config?: { [key: string]: any; }) => Promise<{ data: any; }>; internalAuthData: { [key: string]: any; }; }; }) => (req: Request, res: Response, next: NextFunction) => Promise<any>; export default getAttachAuthDataMiddleware;