Comments (6)
npm install class-validator class-transformer --save
from nestj.
이전에는 없는 게시물을 찾을 때 반환하는 에러메시지,
이번에는 없는 게시물을 삭제하려할 때 반환하는 에러메시지.
from nestj.
어떤 타입이던간에 배열 안에 filter 함수를 사용하면 그 안에 매개인자는 표현식? ( Arrow function ) 을 넣어서 찾을 수가 있나보다.
find도 마찬가지
filter & find
from nestj.
커스텀 파이프 구현
기존에 핸들러 레벨에 파이프를 넣은 게 아닌
파라미터(status)레벨에 대한 파이프를 넣어줬다
from nestj.
지금 코드에서는 필수 요소가 하나 빠졌다. status 값은 { PUBLIC, PRIVATE } 값만 들어올 수 있기 때문에 이것을 위한 validation 처리를 해야한다.
from nestj.
indexOf() 함수는 찾는 인덱스의 값이 없으면 -1 값을 뱉는다. 그걸로 에러 처리를 하면 된다. index !==-1 이 false 라면
if (!함수) 절에서 조건 충족으로 에러 메시지 반환
from nestj.
Related Issues (13)
- [feat] : NestJS install, start HOT 2
- [feat] 게시판 CRUD : R HOT 5
- [feat] 게시판 CRUD : C, D, U HOT 6
- [feat] : TypeORM HOT 1
- [Feat] : Entity 와 Database를 이용한 CRUD HOT 13
- [Feat] : User HOT 22
- [Feat] : Auth HOT 6
- [Feat] : Logging HOT 3
- [Feat] : configuration HOT 2
- [Feat] : WS HOT 17
- socket.io HOT 3
- 오늘까지 로그인 데모 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestj.