Skip to content

Commit

Permalink
Remove trailing slash from API urls
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulAdamDavis committed Oct 10, 2024
1 parent 29f01c5 commit 41220d1
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion tasks/add-member-comp-subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/add-member-newsletter-subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/add-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/add-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/change-author.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/change-role.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/change-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/change-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/change-visibility-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/change-visibility-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/combine-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/content-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const initialise = (options) => {
return {
title: 'Initialising API connection',
task: async (ctx, task) => {
const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/delete-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/delete-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/delete-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/delete-unused-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/find-replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/page-to-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/post-tiers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/random-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/remove-member-comp-subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const initialise = (options) => {
delayBetweenCalls: 50
};

const url = options.apiURL;
const url = options.apiURL.replace(/\/$/, '');
const key = options.adminAPIKey;
const api = new GhostAdminAPI({
url: url.replace('localhost', '127.0.0.1'),
Expand Down

0 comments on commit 41220d1

Please sign in to comment.