@tryghost/admin-api 1.11.1 → 1.11.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.
Files changed (2) hide show
  1. package/lib/index.js +3 -0
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -24,6 +24,9 @@ const resolveAPIPrefix = (version) => {
24
24
  // NOTE: the "version.match(/^v5\.\d+/)" expression should be changed to "version.match(/^v\d+\.\d+/)" once Ghost v5 is out
25
25
  if (version === 'v5' || version === undefined || version.match(/^v5\.\d+/)) {
26
26
  prefix = `/admin/`;
27
+ } else if (version.match(/^v\d+\.\d+/)) {
28
+ const versionPrefix = /^(v\d+)\.\d+/.exec(version)[1];
29
+ prefix = `/${versionPrefix}/admin/`;
27
30
  } else {
28
31
  prefix = `/${version}/admin/`;
29
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/admin-api",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
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": "f699f18279c596be384760adccbbf90a659bd4bc"
34
+ "gitHead": "6c0165f2588537f0e00e76567c2ed2f526f7faff"
35
35
  }