mirror of
https://github.com/wekan/wekan.git
synced 2026-02-15 04:28:07 +01:00
Missing awaits
This commit is contained in:
parent
89ce2f825d
commit
b6ceef6775
2 changed files with 3 additions and 7 deletions
|
|
@ -86,7 +86,7 @@ function loginWithSandstorm(connection, apiHost, apiToken) {
|
|||
var sendXhr = function () {
|
||||
if (!waiting) return; // Method call finished.
|
||||
|
||||
headers = {"Content-Type": "application/x-sandstorm-login-token"};
|
||||
var headers = {"Content-Type": "application/x-sandstorm-login-token"};
|
||||
|
||||
var testInfo = localStorage.sandstormTestUserInfo;
|
||||
if (testInfo) {
|
||||
|
|
|
|||
|
|
@ -43,10 +43,6 @@ if (__meteor_runtime_config__.SANDSTORM) {
|
|||
});
|
||||
}
|
||||
|
||||
var inMeteor = Meteor.bindEnvironment(function (callback) {
|
||||
callback();
|
||||
});
|
||||
|
||||
var logins = {};
|
||||
// Maps tokens to currently-waiting login method calls.
|
||||
|
||||
|
|
@ -179,8 +175,8 @@ if (__meteor_runtime_config__.SANDSTORM) {
|
|||
if (sandstormInfo.id) {
|
||||
// The user is logged into Sandstorm. Create a Meteor account for them, or find the
|
||||
// existing one, and record the user ID.
|
||||
var login = Package["accounts-base"].Accounts.updateOrCreateUserFromExternalService(
|
||||
"sandstorm", sandstormInfo, {profile: {name: sandstormInfo.name}});
|
||||
var login = await Package["accounts-base"].Accounts.updateOrCreateUserFromExternalService(
|
||||
"sandstorm", sandstormInfo, {profile: {name: sandstormInfo.name}});
|
||||
userInfo.userId = login.userId;
|
||||
} else {
|
||||
userInfo.userId = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue