-
Notifications
You must be signed in to change notification settings - Fork 1
updateById
AGenson edited this page Mar 4, 2018
·
4 revisions
Update the entity with the given id
| Property | Type | Default | Description |
|---|---|---|---|
ctx |
Object |
required | Will serve to call a service action: ctx.call
|
id |
any |
required | The field id of the entity to update |
update |
Object |
required | Fields to update --> ex: { username: "user", age: 5 } |
Type: Promise
If the entity was updated successfully :
// res = new value of the entity updated
Promise.resolve({
name: "Operation Successful",
message: `Update Done: element (id: ${res.id}) updated in table`,
data: res.id
});Else (entity not found / an error occured) :
Promise.reject({ ... });cf - details about errors
- Home
- Features
- Install
- Usage
-
Database Functions
- Constructor
- Operations
- Database Errors
- Account Management
