Merge remote-tracking branch 'origin/dev' into release/test
# Conflicts: # .env.example # config/runtime.js # pages/profile/profile.vue # stores/session.js # tests/page-contract.test.mjs # vite.config.js
This commit is contained in:
+4
-3
@@ -59,8 +59,7 @@ function persistSession() {
|
||||
currentUser: session.currentUser,
|
||||
token: session.token,
|
||||
refreshToken: session.refreshToken,
|
||||
tenantId: session.tenantId,
|
||||
apiBase: session.apiBase
|
||||
tenantId: session.tenantId
|
||||
})
|
||||
}
|
||||
|
||||
@@ -69,7 +68,9 @@ export function signIn(account, warehouse, options = {}) {
|
||||
session.token = options.token || account.token || ''
|
||||
session.refreshToken = options.refreshToken || account.refreshToken || ''
|
||||
session.tenantId = options.tenantId || account.tenantId || ''
|
||||
session.apiBase = options.apiBase || account.apiBase || PLATFORM_API_ROOT
|
||||
// The endpoint belongs to the installed build, not to a persisted login.
|
||||
// Otherwise changing environments leaves existing devices on the old API.
|
||||
session.apiBase = PLATFORM_API_ROOT
|
||||
persistSession()
|
||||
return session.currentUser
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user