Api login party invites (#10486)

* Fixed incorrect variable

* Fixed redirect params
This commit is contained in:
Keith Holliday
2018-06-30 22:06:18 -05:00
committed by GitHub
parent 0a8109e496
commit 7c141614ed
2 changed files with 3 additions and 3 deletions

View File

@@ -99,13 +99,13 @@ export default {
}, },
methods: { methods: {
receiveMessage (eventFrom) { receiveMessage (eventFrom) {
if (event.origin !== 'https://www.spritely.app') return; if (eventFrom.origin !== 'https://www.spritely.app') return;
const creds = { const creds = {
userId: this.user._id, userId: this.user._id,
apiToken: this.credentials.API_TOKEN, apiToken: this.credentials.API_TOKEN,
}; };
eventFrom.source.postMessage(creds, event.origin); eventFrom.source.postMessage(creds, eventFrom.origin);
}, },
async addWebhook (url) { async addWebhook (url) {
let webhookInfo = { let webhookInfo = {

View File

@@ -297,7 +297,7 @@ router.beforeEach(function routerGuard (to, from, next) {
name: redirectTo, name: redirectTo,
query: redirectTo === 'login' ? { query: redirectTo === 'login' ? {
redirectTo: to.path, redirectTo: to.path,
} : null, } : to.query,
}); });
} }