Skip to content

Commit

Permalink
fix(cli): fixes botpress cloud ghost-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
slvnperron committed May 11, 2018
1 parent d29fda9 commit 0387467
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/botpress/src/cli/auth.js
Expand Up @@ -163,7 +163,7 @@ const doLogin = async botUrl => {

if (!data.type === 'none') {
return { token: AUTH_DISABLED, kind: 'no-auth' }
} else if (!data.type === 'cloud') {
} else if (data.type === 'cloud') {
return doCloudLogin(botUrl, data)
} else if (data.type === 'root') {
return doRootLogin(botUrl)
Expand Down
6 changes: 5 additions & 1 deletion packages/core/botpress/src/cli/ghost-sync.js
Expand Up @@ -61,7 +61,11 @@ module.exports = async botUrl => {

let config
try {
const { data } = await axios.get(`${botUrl}/api/ghost_content/export`)
const { data } = await axios.get(`${botUrl}/api/ghost_content/export`, {
headers: {
authorization: `Bearer ${token}`
}
})
config = data
} catch (err) {
print.error(err.message || 'Unknown error', 'while fetching ghost content.')
Expand Down

0 comments on commit 0387467

Please sign in to comment.