Skip to content

Commit

Permalink
feature: refactor in progress [WTEL-3630]
Browse files Browse the repository at this point in the history
  • Loading branch information
lizacoma committed Nov 6, 2023
1 parent 0b88384 commit 29507ac
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/modules/permissions/modules/roles/api/roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
getDefaultGetParams,
} from '@webitel/ui-sdk/src/api/defaults';
import applyTransform, {
camelToSnake, handleUnauthorized,
camelToSnake,
merge, notify, snakeToCamel,
starToSearch, log, sanitize,
generateUrl, mergeEach,
generateUrl,
} from '@webitel/ui-sdk/src/api/transformers';
import deepCopy from 'deep-copy';
import ApplicationsAccess from '@webitel/ui-sdk/src/modules/Userinfo/classes/ApplicationsAccess';
Expand All @@ -21,7 +21,6 @@ const preRequestHandler = (item) => {
return copy;
};

// const listGetter = new EndpointListGetterApiConsumer({ baseUrl, instance });
const getRoleList = async (params) => {
const fieldsToSend = ['page', 'size', 'q', 'sort', 'fields', 'id'];

Expand All @@ -45,7 +44,6 @@ const getRoleList = async (params) => {
};
} catch (err) {
throw applyTransform(err, [
handleUnauthorized,
notify,
]);
}
Expand Down Expand Up @@ -76,7 +74,6 @@ const getRole = async ({ itemId: id }) => {
]);
} catch (err) {
throw applyTransform(err, [
handleUnauthorized,
notify,
]);
}
Expand Down Expand Up @@ -105,7 +102,6 @@ const getExtendedRoles = async (params) => {
};
} catch (err) {
throw applyTransform(err, [
handleUnauthorized,
notify,
]);
}
Expand All @@ -124,7 +120,6 @@ const addRole = async ({ itemInstance }) => {
]);
} catch (err) {
throw applyTransform(err, [
handleUnauthorized,
notify,
]);
}
Expand All @@ -146,7 +141,6 @@ const updateRole = async ({ itemInstance, itemId: id }) => {
]);
} catch (err) {
throw applyTransform(err, [
handleUnauthorized,
notify,
]);
}
Expand All @@ -159,7 +153,6 @@ const deleteRole = async ({ id }) => {
return applyTransform(response.data, []);
} catch (err) {
throw applyTransform(err, [
handleUnauthorized,
notify,
]);
}
Expand Down Expand Up @@ -195,7 +188,6 @@ const getPermissionsOptions = async (params) => {
};
} catch (err) {
throw applyTransform(err, [
handleUnauthorized,
notify,
]);
}
Expand Down

0 comments on commit 29507ac

Please sign in to comment.