mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 12:30:02 +02:00
Switch egw.user(..., async=true) to always return a Promise for consistency
Switch Et2ButtonTimestamper to use egw.user(...,async=true)
This commit is contained in:
@@ -122,11 +122,16 @@ egw.extend('user', egw.MODULE_GLOBAL, function()
|
||||
// Synchronous
|
||||
egw.json("EGroupware\\Api\\Framework::ajax_user_list",[], cache_it, this, false).sendRequest(false);
|
||||
}
|
||||
let result = [];
|
||||
if (type === 'both')
|
||||
{
|
||||
return [].concat(accountStore.accounts, accountStore.groups);
|
||||
result = [].concat(accountStore.accounts, accountStore.groups);
|
||||
}
|
||||
return [].concat(accountStore[type]);
|
||||
else
|
||||
{
|
||||
result = [].concat(accountStore[type]);
|
||||
}
|
||||
return async ? Promise.resolve(result) : result;
|
||||
},
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user