mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Api login party invites (#10486)
* Fixed incorrect variable * Fixed redirect params
This commit is contained in:
@@ -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 = {
|
||||||
|
|||||||
@@ -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,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user