@stackfactor/client-api 1.0.89 → 1.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/role.js +6 -5
- package/lib/users.js +1 -1
- package/package.json +1 -1
package/lib/role.js
CHANGED
|
@@ -280,16 +280,17 @@ export const setRoleInformation = (id, data, token) => {
|
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
282
|
* Set user roles
|
|
283
|
-
* @param {String} id
|
|
284
|
-
* @param {Array<Object>} roles
|
|
285
|
-
* @param {String}
|
|
283
|
+
* @param {String} id The id of the user to be updated
|
|
284
|
+
* @param {Array<Object>} roles The list of roles to be assigned to the user
|
|
285
|
+
* @param {String} jobDescription The job description to be assigned to the user
|
|
286
|
+
* @param {String} token Authorization token
|
|
286
287
|
* @returns {Promise}
|
|
287
288
|
*/
|
|
288
|
-
export const setUserRoles = (id, roles,
|
|
289
|
+
export const setUserRoles = (id, roles, jobDescription, token) => {
|
|
289
290
|
return new Promise(function (resolve, reject) {
|
|
290
291
|
const requestData = {
|
|
291
292
|
roles: roles,
|
|
292
|
-
|
|
293
|
+
jobDescription: jobDescription,
|
|
293
294
|
};
|
|
294
295
|
if (id) requestData.userid = id;
|
|
295
296
|
let request = client.post(`api/v1/roles/settouser/`, requestData, {
|
package/lib/users.js
CHANGED
|
@@ -536,7 +536,7 @@ export const sendPasswordResetNotification = (email) => {
|
|
|
536
536
|
export const setUserInformation = (userId, category, data, token) => {
|
|
537
537
|
return new Promise(function (resolve, reject) {
|
|
538
538
|
const requestData = {
|
|
539
|
-
data: category ? { category: data } : data,
|
|
539
|
+
data: category ? { [category]: data } : data,
|
|
540
540
|
userId: userId,
|
|
541
541
|
};
|
|
542
542
|
let confirmationRequest = client.post("api/v1/users/user", requestData, {
|