const signupMap: any = {
GET(req: Request, res: Response) {
res.render(path.join(__dirname, '../../views/users/signup.html'));
}
};
const store = {
signupFunc(method: string) {
signupMap[method]();
}
};
const signup = (req: Request, res: Response) => {
store.signupFunc(req.method);
};
제목은 어그로고
if문 제거하려고 하는데 컨트롤러에서 저렇게 함수 호출하면 TypeError: Cannot read properties of undefined (reading 'render') 에러가 뜸
이거 어떻게 하면 되지
제목이 팩트라 답변할사람이없음
GET에 req랑 res가 안들어가고있잖어