Constructor
new AbstractApiUtils()
- Source:
Methods
(static) argsFromReq(req) → {Array.<*>}
- Description:
- Generates a list of arguments to be passed to the MongoDBModule from a request object
- Source:
Parameters:
Name |
Type |
Description |
req |
external:ExpressRequest
|
|
Returns:
-
Type
-
Array.<*>
- Description:
- Generates REST API metadata and stores on route config
- Source:
Parameters:
Name |
Type |
Description |
instance |
AbstractApiModule
|
The current AbstractApiModule instance |
(static) httpMethodToAction(method) → {String}
- Description:
- Converts HTTP methods to a corresponding 'action' for use in auth
- Source:
Parameters:
Name |
Type |
Description |
method |
String
|
The HTTP method |
Returns:
-
Type
-
String
(static) httpMethodToDBFunction(method) → {String}
- Description:
- Converts HTTP methods to a corresponding database function
- Source:
Parameters:
Name |
Type |
Description |
method |
String
|
The HTTP method |
Returns:
-
Type
-
String
(static) stringifyValues(data)
- Description:
- Clones an object and converts any Dates and ObjectIds to Strings
- Source:
Parameters:
Name |
Type |
Description |
data |
Object
|
|
Returns:
A clone object with stringified ObjectIds