From 528ec4cf2d7816f160fd6b3097f16bddbc4ab70c Mon Sep 17 00:00:00 2001 From: r350178982 <32759763+r350178982@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:57:16 +0800 Subject: [PATCH] Update dtable-web-api.js --- src/dtable-web-api.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/dtable-web-api.js b/src/dtable-web-api.js index 5a881b80..5eadf1d8 100644 --- a/src/dtable-web-api.js +++ b/src/dtable-web-api.js @@ -1213,6 +1213,14 @@ class DTableWebAPI { }; return this.req.put(url, data, {headers: {'Content-Type': 'application/json'}}); } + + updateAppUserCandidate(token, app_user_id, is_candidate) { + let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-users/' + app_user_id + '/'; + let data = { + 'is_candidate': is_candidate + }; + return this.req.put(url, data, {headers: {'Content-Type': 'application/json'}}); + } deleteAppUser(token, app_user_id) { let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-users/' + app_user_id + '/'; @@ -1256,7 +1264,7 @@ class DTableWebAPI { return this.req.get(url); } - updateAppRole(token, app_role_id, role_name, permission, permission_detail) { + updateAppRole(token, app_role_id, role_name, permission, permission_detail, is_candidate) { let url = this.server + '/api/v2.1/universal-apps/' + token + '/app-roles/' + app_role_id + '/'; let data = { 'role_name': role_name, @@ -1265,6 +1273,9 @@ class DTableWebAPI { if (permission_detail){ data['permission_detail'] = permission_detail; } + if (is_candidate){ + data['is_candidate'] = is_candidate; + } return this.req.put(url, data, {headers: {'Content-Type': 'application/json'}}); }