-
Notifications
You must be signed in to change notification settings - Fork 0
Controller
David Joseph edited this page Nov 11, 2021
·
1 revision
Used to handle the response when a request is made to a route.
model: A mongoose.model indicating the resource for CRUD operations to be performed.
modelName: A string representing the extended URL at which the resource can be accessed.
service: An instance of a custom Service. Uses the default service if not specified.
createResource: Used to create a new resource for the given model.
getOneById: Used to fetch a single document by it's _id.
updateOneById: Used to update a single document by it's _id.
deleteById: Used to delete a single document by it's _id.