Commit bbc59a38 authored by Anton's avatar Anton

fix missing api reference in createArchive function

parent 5e078147
...@@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Author middleware and base Service class now in [mbjs-generic-api](https://gitlab.rlp.net/motionbank/mbjs/generic-api) - Author middleware and base Service class now in [mbjs-generic-api](https://gitlab.rlp.net/motionbank/mbjs/generic-api)
- Author middleware now retrieves profile via external HTTP request - Author middleware now retrieves profile via external HTTP request
### Fixed
- Missing api reference in createArchive method
### Removed ### Removed
- Project specific script `bin/digitanz-fix.js` - Project specific script `bin/digitanz-fix.js`
......
...@@ -33,7 +33,7 @@ module.exports.setupArchives = (api, mapService, annotationService) => { ...@@ -33,7 +33,7 @@ module.exports.setupArchives = (api, mapService, annotationService) => {
await annotationService.findHandler(request, async result => { await annotationService.findHandler(request, async result => {
if (result.error) return send(res, result.code) if (result.error) return send(res, result.code)
data.annotations = result.data.items data.annotations = result.data.items
const url = await exports.createArchive(data) const url = await exports.createArchive(api, data)
send(res, 200, url) send(res, 200, url)
}) })
}) })
...@@ -118,7 +118,7 @@ module.exports.setupArchives = (api, mapService, annotationService) => { ...@@ -118,7 +118,7 @@ module.exports.setupArchives = (api, mapService, annotationService) => {
}) })
} }
module.exports.createArchive = async data => { module.exports.createArchive = async (api, data) => {
Assert.isType(data.map, 'object', 'data.map must be object') Assert.isType(data.map, 'object', 'data.map must be object')
Assert.ok(Array.isArray(data.annotations), 'data.annotations must be array') Assert.ok(Array.isArray(data.annotations), 'data.annotations must be array')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment