Skip to content

Commit

Permalink
Merge pull request #539 from webitel/refactor/file-reformat
Browse files Browse the repository at this point in the history
refactor: reformat code
  • Loading branch information
dlohvinov authored Oct 18, 2023
2 parents 05512b5 + 1a7cb5b commit 10cf545
Show file tree
Hide file tree
Showing 491 changed files with 14,300 additions and 10,749 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "vite",
"build": "vite build",
"test:unit": "vitest",
"prepare": "husky install"
"prepare": "husky install",
"lint:fix": "eslint --fix --ext .js,.vue src"
},
"dependencies": {
"@vue/compat": "^3.2.47",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export default class APIPermissionsGetter {

constructor(url) {
this.baseUrl = url;
this.listGetter = new EndpointListGetterApiConsumer({ baseUrl: this.baseUrl, instance }, {
this.listGetter = new EndpointListGetterApiConsumer({
baseUrl: this.baseUrl,
instance,
}, {
defaultListObject: { user: false },
listResponseHandler: APIPermissionsGetter.handlePermissionsListResponse,
nestedUrl: this._nestedUrl,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import {
EndpointPatcherApiConsumer,
} from 'webitel-sdk/esm2015/api-consumers';
import { EndpointPatcherApiConsumer } from 'webitel-sdk/esm2015/api-consumers';
import instance from '../instance';

export default class APIPermissionsPatcher {
constructor(baseUrl) {
this.baseUrl = baseUrl;
this.patcher = new EndpointPatcherApiConsumer({ baseUrl: this.baseUrl, instance });
this.patcher = new EndpointPatcherApiConsumer({
baseUrl: this.baseUrl,
instance,
});
}

async patchItem({ id, changes }) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/old/instance.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import axios from 'axios';
import updateTokenInterceptor
from '@webitel/ui-sdk/src/api/interceptors/request/updateToken.interceptor';
import handleUnauthorizedInterceptor
from '@webitel/ui-sdk/src/api/interceptors/response/handleUnauthorized.interceptor';
import axios from 'axios';
import defaultInterceptorsSetup from './interceptors/defaultInterceptorsSetup';

// config with specific properties which doesn't fit to axios config
Expand Down
6 changes: 3 additions & 3 deletions src/app/api/old/interceptors/InterceptorType.enum.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const InterceptorType = Object.freeze({
REQUEST: 'request',
RESPONSE: 'response',
});
REQUEST: 'request',
RESPONSE: 'response',
});

export default InterceptorType;
6 changes: 4 additions & 2 deletions src/app/api/old/interceptors/defaultInterceptorsSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import applyInterceptors from './apply';
import InterceptorType from './InterceptorType.enum';
import attachStarToRequestUrlSearchQuery
from './request/attachStarToRequestUrlSearchQuery.interceptor';
import camelToSnakeRequestData from './request/camelToSnakeRequestData.interceptor';
import camelToSnakeRequestData
from './request/camelToSnakeRequestData.interceptor';
import errorEventBusNotificationResponse
from './response/errorEventBusNotificationResponse.interceptor';
import snakeToCamelResponseData from './response/snakeToCamelResponseData.interceptor';
import snakeToCamelResponseData
from './response/snakeToCamelResponseData.interceptor';
import unauthorizedResponse from './response/unauthorizedResponse.interceptor';

const DO_NOT_CONVERT_KEYS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const onFulfilled = (DO_NOT_CONVERT_KEYS = []) => (request) => {
|| request.method === 'patch') {
if (typeof request.data === 'string') {
request.data = JSON
.stringify(objCamelToSnake(JSON.parse(request.data), DO_NOT_CONVERT_KEYS));
.stringify(objCamelToSnake(JSON.parse(request.data), DO_NOT_CONVERT_KEYS));
} else {
request.data = objCamelToSnake(request.data, DO_NOT_CONVERT_KEYS);
}
Expand Down
247 changes: 141 additions & 106 deletions src/app/assets/dummy/adm-dummy-after-search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/app/assets/icons/sprite/adm-contact-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions src/app/assets/icons/sprite/adm-directory.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/app/assets/icons/sprite/adm-integrations.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/app/assets/icons/sprite/adm-license-users.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 10cf545

Please sign in to comment.