@nocobase/actions 0.8.0-alpha.9 → 0.8.1-alpha.4

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.
@@ -29,11 +29,12 @@ function _add() {
29
29
  _add = _asyncToGenerator(function* (ctx, next) {
30
30
  const repository = (0, _utils.getRepositoryFromParams)(ctx);
31
31
 
32
- if (!(repository instanceof _database().MultipleRelationRepository || repository instanceof _database().HasManyRepository)) {
32
+ if (!(repository instanceof _database().MultipleRelationRepository || repository instanceof _database().HasManyRepository || repository instanceof _database().ArrayFieldRepository)) {
33
33
  return yield next();
34
34
  }
35
35
 
36
36
  yield repository.add(ctx.action.params.values);
37
+ ctx.status = 200;
37
38
  yield next();
38
39
  });
39
40
  return _add.apply(this, arguments);
@@ -32,7 +32,7 @@ function _get() {
32
32
  filter,
33
33
  context: ctx
34
34
  });
35
- ctx.body = instance;
35
+ ctx.body = instance || null;
36
36
  yield next();
37
37
  });
38
38
  return _get.apply(this, arguments);
package/lib/utils.js CHANGED
@@ -27,6 +27,7 @@ function RelationRepositoryActionBuilder(method) {
27
27
  var _ref = _asyncToGenerator(function* (ctx, next) {
28
28
  const repository = getRepositoryFromParams(ctx);
29
29
  yield repository[method](ctx.action.params.values);
30
+ ctx.status = 200;
30
31
  yield next();
31
32
  });
32
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/actions",
3
- "version": "0.8.0-alpha.9",
3
+ "version": "0.8.1-alpha.4",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "licenses": [
@@ -12,14 +12,14 @@
12
12
  "main": "./lib/index.js",
13
13
  "types": "./lib/index.d.ts",
14
14
  "dependencies": {
15
- "@nocobase/cache": "0.8.0-alpha.9",
16
- "@nocobase/database": "0.8.0-alpha.9",
17
- "@nocobase/resourcer": "0.8.0-alpha.9"
15
+ "@nocobase/cache": "0.8.1-alpha.4",
16
+ "@nocobase/database": "0.8.1-alpha.4",
17
+ "@nocobase/resourcer": "0.8.1-alpha.4"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",
21
21
  "url": "git+https://github.com/nocobase/nocobase.git",
22
22
  "directory": "packages/actions"
23
23
  },
24
- "gitHead": "6afe02d59bb22df0f96a7605c9001dcc17a30d6a"
24
+ "gitHead": "22ccdf7bd7fcbd16aeefd5250db237a4bd1ccff1"
25
25
  }