adapt-authoring-courseassets 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- name: Standard.js formatting check
1
+ name: Lint
2
2
  on: push
3
3
  jobs:
4
4
  default:
@@ -9,4 +9,4 @@ jobs:
9
9
  with:
10
10
  node-version: 'lts/*'
11
11
  - run: npm install
12
- - run: npx standard
12
+ - run: npx standard
@@ -79,10 +79,7 @@ class CourseAssetsModule extends AbstractApiModule {
79
79
  return
80
80
  }
81
81
  await Promise.all(ids.map(async _id => {
82
- const [asset] = await this.assets.find({ _id })
83
- if (!asset) {
84
- throw this.app.errors.NOT_FOUND.setData({ type: 'asset', id: _id })
85
- }
82
+ await this.assets.findOne({ _id })
86
83
  await this.insert({ courseId, contentId, assetId: _id })
87
84
  }))
88
85
  this.log('debug', 'UPDATE', courseId, contentId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-courseassets",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Module for managing course asset usage",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-courseassets",
6
6
  "license": "GPL-3.0",