From 5b8fe0f6432c98f5795645e4ce3cb1acebdf5cef Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Tue, 23 Apr 2019 15:40:49 +0200 Subject: [PATCH] Updated init method to take siteUrl named param --- ghost/members-theme-bindings/README.md | 2 +- ghost/members-theme-bindings/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ghost/members-theme-bindings/README.md b/ghost/members-theme-bindings/README.md index 7364f3cac7..f1b8d7e557 100644 --- a/ghost/members-theme-bindings/README.md +++ b/ghost/members-theme-bindings/README.md @@ -14,7 +14,7 @@ or ```js const MembersThemeBindings = require('@tryghost/members-theme-bindings'); -MembersThemeBindings.init("http://ghost-site.com/root-ghost-path"); +MembersThemeBindings.init({siteUrl: "https://ghost-site.com/root-ghost-path"}); ``` ## Develop diff --git a/ghost/members-theme-bindings/index.js b/ghost/members-theme-bindings/index.js index 94faf0c4fc..dc1962553f 100644 --- a/ghost/members-theme-bindings/index.js +++ b/ghost/members-theme-bindings/index.js @@ -4,8 +4,8 @@ const browserAuth = require('@tryghost/members-browser-auth'); module.exports.init = init; -function init(membersUrl) { - const auth = browserAuth({membersUrl}); +function init({siteUrl}) { + const auth = browserAuth({membersUrl: siteUrl + '/members'}); const [hashMatch, hash, query] = window.location.hash.match(/^#([^?]+)\??(.*)$/) || [];