-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] : Pipe 로 전송과 검증을 하기 #5
Comments
npm install class-validator class-transformer --save |
이전에는 없는 게시물을 찾을 때 반환하는 에러메시지, |
어떤 타입이던간에 배열 안에 filter 함수를 사용하면 그 안에 매개인자는 표현식? ( Arrow function ) 을 넣어서 찾을 수가 있나보다. |
커스텀 파이프 구현 |
지금 코드에서는 필수 요소가 하나 빠졌다. status 값은 { PUBLIC, PRIVATE } 값만 들어올 수 있기 때문에 이것을 위한 validation 처리를 해야한다. |
indexOf() 함수는 찾는 인덱스의 값이 없으면 -1 값을 뱉는다. 그걸로 에러 처리를 하면 된다. index !==-1 이 false 라면 |
파이프를 사용할 때
핸들러 레벨
파라미터 레벨
글로벌 레벨 이렇게 단계별로 존재한다.
The text was updated successfully, but these errors were encountered: