Skip to content

Commit 75028d1

Browse files
committed
Update validation util implementation.
1 parent 8286ad6 commit 75028d1

File tree

4 files changed

+7701
-5270
lines changed

4 files changed

+7701
-5270
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Template for building REST APIs with Node and Koa JS
2828
```
2929
const { Joi, itemTypes, validate } = require('../utils/validator');
3030
31-
const registrationSchema = {
31+
const registrationSchema = Joi.object({
3232
username: Joi.string().min(4).max(30).required(),
3333
password: Joi.string().required()
34-
};
34+
});
3535
3636
const validateRegistration = () => validate({
3737
schema: registrationSchema,
@@ -56,8 +56,8 @@ Template for building REST APIs with Node and Koa JS
5656
- define your mongoose models and you are good to go.
5757

5858
### Run
59-
- run `yarn start`
59+
- run `npm run dev`
6060

6161
### Testing
62-
- run `yarn test`
62+
- run `npm test`
6363

0 commit comments

Comments
 (0)