chore: Use currentUser from authentication

This commit is contained in:
Faruk AYDIN
2021-10-14 16:38:03 +02:00
committed by Ali BARIN
parent bdd0843d94
commit 5be9ff8383
4 changed files with 18 additions and 22 deletions

View File

@@ -1,10 +1,6 @@
import { Request, Response, NextFunction } from 'express';
import User from '../models/user';
import UserType from '../types/user';
interface RequestWithCurrentUser extends Request {
currentUser: UserType
}
import RequestWithCurrentUser from '../types/express/request-with-current-user';
const authentication = async (req: RequestWithCurrentUser, _res: Response, next: NextFunction) => {
// We set authentication to use the sample user we created temporarily.