-
Notifications
You must be signed in to change notification settings - Fork 1
findById
AGenson edited this page Mar 4, 2018
·
7 revisions
Find the entity with the given id, and filter the fields of the result
Property | Type | Default | Description |
---|---|---|---|
ctx |
Object |
required | Will serve to call a service action: ctx.call
|
search |
Object |
required |
Sub-Property | Type | Default | Description |
---|---|---|---|
id |
any |
required | ex: { id: "G-123456" }
|
filter |
Array.<String> |
- | ex: ["id", "username"]
|
Type: Promise
If the entity was found :
// res = entity found
Promise.resolve({
name: "Operation Successful",
message: `Search Complete: element found`,
data: res
});
Else (nothing found / an error occured) :
Promise.reject({ ... });
cf - details about errors
- Home
- Features
- Install
- Usage
-
Database Functions
- Constructor
- Operations
- Database Errors
- Account Management