Methods
(inner) _addMediaHash(survey) → {Promise}
Parameters:
Name | Type | Description |
---|---|---|
survey |
module:survey-model~SurveyObject | survey object |
Returns:
always resolved promise
- Type
- Promise
(inner) _authenticate(survey) → {Promise.<module:survey-model~SurveyObject>}
Parameters:
Name | Type | Description |
---|---|---|
survey |
module:survey-model~SurveyObject | survey object |
Returns:
a Promise resolving with survey object
- Type
- Promise.<module:survey-model~SurveyObject>
(inner) _checkQuota(survey) → {Promise.<module:survey-model~SurveyObject>}
Parameters:
Name | Type | Description |
---|---|---|
survey |
module:survey-model~SurveyObject | survey object |
Returns:
a Promise resolving with survey object
- Type
- Promise.<module:survey-model~SurveyObject>
(inner) _getCombinedHash(survey) → {string}
Parameters:
Name | Type | Description |
---|---|---|
survey |
module:survey-model~SurveyObject | survey object |
Returns:
- a hash
- Type
- string
(inner) _getFormFromCache(survey) → {Promise.<module:survey-model~SurveyObject>}
Parameters:
Name | Type | Description |
---|---|---|
survey |
module:survey-model~SurveyObject | survey object |
Returns:
a Promise resolving with survey object
- Type
- Promise.<module:survey-model~SurveyObject>
(inner) _getSurveyParams(req) → {Promise.<module:survey-model~SurveyObject>}
Parameters:
Name | Type | Description |
---|---|---|
req |
module:api-controller~ExpressRequest | HTTP request |
Returns:
a Promise resolving with survey object
- Type
- Promise.<module:survey-model~SurveyObject>
(inner) _respond(res, survey)
Parameters:
Name | Type | Description |
---|---|---|
res |
module:api-controller~ExpressResponse | HTTP response |
survey |
module:survey-model~SurveyObject | survey object |
(inner) _setCookieAndCredentials(survey, req) → {Promise.<module:survey-model~SurveyObject>}
Parameters:
Name | Type | Description |
---|---|---|
survey |
module:survey-model~SurveyObject | survey object |
req |
module:api-controller~ExpressRequest | HTTP request |
Returns:
a Promise resolving with survey object with added credentials
- Type
- Promise.<module:survey-model~SurveyObject>
(inner) _updateCache(survey) → {Promise.<module:survey-model~SurveyObject>}
Update the Cache if necessary.
Parameters:
Name | Type | Description |
---|---|---|
survey |
module:survey-model~SurveyObject | survey object |
Returns:
a Promise resolving with survey object
- Type
- Promise.<module:survey-model~SurveyObject>
(inner) getSurveyHash(req, res, next)
Obtains the hash of the cached Survey Parts
Parameters:
Name | Type | Description |
---|---|---|
req |
module:api-controller~ExpressRequest | HTTP request |
res |
module:api-controller~ExpressResponse | HTTP response |
next |
function | Express callback |
(async, inner) getSurveyParts(req, res, next)
Obtains HTML Form, XML model, and existing XML instance
Parameters:
Name | Type | Description |
---|---|---|
req |
module:api-controller~ExpressRequest | HTTP request |
res |
module:api-controller~ExpressResponse | HTTP response |
next |
function | Express callback |