Support admin login in QuickConnect
This commit is contained in:
parent
711e5ae728
commit
8824b7c72f
3 changed files with 7 additions and 5 deletions
|
@ -2,7 +2,9 @@ import { authorize } from './helper';
|
|||
import globalize from '../../../scripts/globalize';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
export default function (view) {
|
||||
export default function (view, params) {
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
|
||||
view.addEventListener('viewshow', function () {
|
||||
const codeElement = view.querySelector('#txtQuickConnectCode');
|
||||
|
||||
|
@ -17,7 +19,7 @@ export default function (view) {
|
|||
|
||||
// Remove spaces from code
|
||||
const normalizedCode = codeElement.value.replace(/\s/g, '');
|
||||
authorize(normalizedCode);
|
||||
authorize(normalizedCode, userId);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue