transformation-controller

Methods

(inner) _addMediaHash(survey) → {Promise}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject
Returns:

always resolved promise

Type
Promise

(inner) _authenticate(survey) → {Promise}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject
Returns:
Type
Promise

(inner) _checkQuota(survey) → {Promise}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject
Returns:
Type
Promise

(inner) _getCombinedHash(survey)

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject

(inner) _getFormDirectly(survey) → {Promise}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject
Returns:
Type
Promise

(inner) _getFormFromCache(survey) → {Promise}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject
Returns:
Type
Promise

(inner) _getMediaMap(manifest) → {object|null}

Source:

Adds a media map, see enketo/enketo-transformer

Parameters:
Name Type Description
manifest Array | *
Returns:

media map object

Type
object | null

(inner) _getSurveyParams(req) → {Promise}

Source:
Parameters:
Name Type Description
req module:api-controller~ExpressRequest
Returns:
Type
Promise

(inner) _replaceMediaSources(survey) → {*}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject
Returns:

updated survey

Type
*

(inner) _respond(res, survey)

Source:
Parameters:
Name Type Description
res module:api-controller~ExpressResponse
survey module:survey-model~SurveyObject

(inner) _setCookieAndCredentials(survey, req) → {Promise}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject
req module:api-controller~ExpressRequest
Returns:
Type
Promise

(inner) _updateCache(survey)

Source:

Update the Cache if necessary.

Parameters:
Name Type Description
survey module:survey-model~SurveyObject
Promise

(inner) getSurveyHash(req, res, next)

Source:

Obtains the hash of the cached Survey Parts

Parameters:
Name Type Description
req module:api-controller~ExpressRequest
res module:api-controller~ExpressResponse
next function

Express callback

(inner) getSurveyParts(req, res, next)

Source:

Obtains HTML Form, XML model, and existing XML instance

Parameters:
Name Type Description
req module:api-controller~ExpressRequest
res module:api-controller~ExpressResponse
next function

Express callback