79125059

Date: 2024-10-25 09:30:12
Score: 1.5
Natty:
Report link

Remember to use :Promise<any>
import { Request, Response, NextFunction } from 'express';

const isLoggedIn = (req: Request, res: Response, next: NextFunction):Promise<any>=>{ if (!req.isAuthenticated()) { return res.status(401).json({ error: "User must sign in" }) } next(); }

export default { isLoggedIn }

this will solve the typescript problem after new update

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ujjwal Agrawal