@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.
- package/lib/index.js +4 -0
- 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.
|
|
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": "
|
|
34
|
+
"gitHead": "af2e0206c91195715d42b1640f453204abef5a5d"
|
|
35
35
|
}
|