From 27c0008a02fb3eba6dd6ad5c764b8f270471b840 Mon Sep 17 00:00:00 2001 From: r350178982 <32759763+r350178982@users.noreply.github.com> Date: Mon, 25 Dec 2023 17:47:44 +0800 Subject: [PATCH 1/2] Update dtable-web-api.js --- src/dtable-web-api.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/dtable-web-api.js b/src/dtable-web-api.js index d745a743..dc0d9aaa 100644 --- a/src/dtable-web-api.js +++ b/src/dtable-web-api.js @@ -1198,6 +1198,11 @@ class DTableWebAPI { }); } + listAppRelatedUsers(token) { + let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-related-users/'; + return this.req.get(url); + } + searchAppUsers(appUuid, query, page, perPage) { let url = this.server + '/api/v2.1/universal-apps/' + appUuid + '/search-user/'; let params = { @@ -1237,6 +1242,38 @@ class DTableWebAPI { return this.req.delete(url); } + listAppGroups(token, page, perPage) { + let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/'; + let params = { + page: page, + per_page: perPage + }; + return this.req.get(url, { + params: params + }); + } + + addAppGroup(token, group_id, app_role_id) { + let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/'; + let data = {'group_id': group_id, 'app_role_id': app_role_id}; + return this._sendPostRequest(url, data, {headers: {'Content-Type': 'application/json'}}); + } + + + updateAppGroupRole(token, app_group_id, role_id) { + let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/' + app_group_id + '/'; + let data = { + 'app_role_id': role_id + }; + return this.req.put(url, data, {headers: {'Content-Type': 'application/json'}}); + } + + deleteAppGroup(token, app_group_id) { + let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/' + app_group_id + '/'; + return this.req.delete(url); + } + + getAppUserSyncInfo(appUuid) { let url = this.server + '/api/v2.1/universal-apps/' + appUuid + '/app-users/sync/'; return this.req.get(url); From 190f651b8017a1321e3c9411d6087133918f5dcc Mon Sep 17 00:00:00 2001 From: r350178982 <32759763+r350178982@users.noreply.github.com> Date: Wed, 31 Jan 2024 18:27:23 +0800 Subject: [PATCH 2/2] Update dtable-web-api.js --- src/dtable-web-api.js | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/dtable-web-api.js b/src/dtable-web-api.js index dc0d9aaa..af83eb98 100644 --- a/src/dtable-web-api.js +++ b/src/dtable-web-api.js @@ -1242,38 +1242,6 @@ class DTableWebAPI { return this.req.delete(url); } - listAppGroups(token, page, perPage) { - let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/'; - let params = { - page: page, - per_page: perPage - }; - return this.req.get(url, { - params: params - }); - } - - addAppGroup(token, group_id, app_role_id) { - let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/'; - let data = {'group_id': group_id, 'app_role_id': app_role_id}; - return this._sendPostRequest(url, data, {headers: {'Content-Type': 'application/json'}}); - } - - - updateAppGroupRole(token, app_group_id, role_id) { - let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/' + app_group_id + '/'; - let data = { - 'app_role_id': role_id - }; - return this.req.put(url, data, {headers: {'Content-Type': 'application/json'}}); - } - - deleteAppGroup(token, app_group_id) { - let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-groups/' + app_group_id + '/'; - return this.req.delete(url); - } - - getAppUserSyncInfo(appUuid) { let url = this.server + '/api/v2.1/universal-apps/' + appUuid + '/app-users/sync/'; return this.req.get(url);