allow for injectable server discovery
This commit is contained in:
parent
61f7ca1da4
commit
6ba570e062
3 changed files with 91 additions and 26 deletions
|
@ -23,7 +23,7 @@
|
|||
}
|
||||
|
||||
function set(data) {
|
||||
|
||||
|
||||
if (data) {
|
||||
credentials = data;
|
||||
store.setItem(key, JSON.stringify(data));
|
||||
|
@ -53,8 +53,9 @@
|
|||
})[0];
|
||||
|
||||
if (existing) {
|
||||
|
||||
// Merge the data
|
||||
existing.DateLastAccessed = Math.max(existing.DateLastAccessed || 0, server.DateLastAccessed || 0, new Date().getTime());
|
||||
existing.DateLastAccessed = Math.max(existing.DateLastAccessed || 0, server.DateLastAccessed || 0);
|
||||
|
||||
if (server.AccessToken) {
|
||||
existing.AccessToken = server.AccessToken;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue