From de105b35a41d6a1dc449dedb2ea4fcd3195a0ddd Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 5 Sep 2024 11:03:17 +0300 Subject: [PATCH] jsdoc --- client/src/app.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/client/src/app.js b/client/src/app.js index 8e7e8b9419..03f1d0ba81 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -828,6 +828,21 @@ class App { }); } + /** + * @typedef {Record} module:app~LoginData + * @property {Record} user + * @property {Record} preferences + * @property {Record} acl + * @property {Record} settings + * @property {Record} appParams + * @property {string} language + * @property {{ + * userName: string, + * token: string, + * anotherUser?: string, + * }} auth + */ + /** * @public */ @@ -835,7 +850,7 @@ class App { this.auth = this.storage.get('user', 'auth') || null; this.anotherUser = this.storage.get('user', 'anotherUser') || null; - this.baseController.on('login', data => { + this.baseController.on('login', /** module:app~LoginData */ data => { const userId = data.user.id; const userName = data.auth.userName; const token = data.auth.token; @@ -856,7 +871,6 @@ class App { this.storage.set('user', 'anotherUser', this.anotherUser); this.setCookieAuth(userName, token); - this.initUserData(data, () => this.onAuth(true)); });