AuthoredModule

authored. AuthoredModule

Add supplementary data to existing schemas which defines how and when data was authored

Constructor

new AuthoredModule()

Source:

Extends

  • AbstractModule

Members

registeredModules :Array.<AbstractModule>

Source:
Store of all modules registered to use this plugin
Type:
  • Array.<AbstractModule>

schemaName :String

Source:
Name of the schema extension
Type:
  • String

Methods

(async) checkAccess(mod, req, data) → {Promise}

Source:
Function to update authored timestamp on data change
Parameters:
Name Type Description
mod AbstractModule
req external:ExpressRequest
data Object
Returns:
Resolves with boolean
Type
Promise

(async) init()

Source:

(async) registerModule(mod, options)

Source:
Registers a module for use with this plugin
Parameters:
Name Type Description
mod AbstractApiModule
options Object
Properties
Name Type Description
accessCheck Boolean Whether an access check should be performed

(async) updateAuthor(req) → {Promise}

Source:
Function to update author on data change
Parameters:
Name Type Description
req external:ExpressRequest
Returns:
Resolves with the modified data
Type
Promise

(async) updateTimestamps(action, data) → {Promise}

Source:
Function to update authored timestamp on data change
Parameters:
Name Type Description
action String
data Object
Returns:
Type
Promise