@tryghost/admin-api 1.9.1 → 1.10.0

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.
Files changed (2) hide show
  1. package/lib/index.js +4 -0
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -138,6 +138,10 @@ module.exports = function GhostAdminAPI(options) {
138
138
  'users'
139
139
  ];
140
140
 
141
+ if (typeof config.version === 'string' && config.version.startsWith('v2')) {
142
+ resources.push('subscribers');
143
+ }
144
+
141
145
  const api = resources.reduce((apiObject, resourceType) => {
142
146
  function add(data, queryParams = {}) {
143
147
  if (!data || !Object.keys(data).length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/admin-api",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
4
4
  "repository": "https://github.com/TryGhost/SDK/tree/master/packages/admin-api",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -31,5 +31,5 @@
31
31
  "form-data": "^4.0.0",
32
32
  "jsonwebtoken": "^8.4.0"
33
33
  },
34
- "gitHead": "3633e6e946c394c73e53b496477543e98e301aa4"
34
+ "gitHead": "af2e0206c91195715d42b1640f453204abef5a5d"
35
35
  }