- api.domain.com just is a example. Run at local: localhost:PORT/v1.
firstName: { type: String },
lastName: { type: String },
email: { type: String },
decks: [{ type: Schema.Types.ObjectId, ref: "Deck" }],
api.mydomain.com/v1/users
api.mydomain.com/v1/users/:userId
api.mydomain.com/v1/users
api.mydomain.com/v1/users/:userId
api.mydomain.com/v1/users/:userId
name: {type: String,},
description: {type: String},
total: {type: Number, default: 0},
owner: {
type: Schema.Types.ObjectId,
ref: "User",
}
api.mydomain.com/v1/users/:userId/decks
api.mydomain.com/v1/decks
api.mydomain.com/v1/decks/:deckId
api.mydomain.com/v1/users/:userId/decks
api.mydomain.com/v1/decks/:deckId
api.mydomain.com/v1/decks/:deckId
api.mydomain.com/v1/decks/:deckId
- filters
- sort
- random
- pagination
- custom joi error message