Skip to content

Commit

Permalink
refactor: remove console.logs [WTEL-4061]
Browse files Browse the repository at this point in the history
  • Loading branch information
liza-pohranichna committed Dec 28, 2023
1 parent d31f5c1 commit cc63023
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 0 additions & 2 deletions src/modules/_shared/permissions-tab/api/PermissionsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ export default class PermissionsAPI {
constructor(url) {
this.url = url;
this._permissionsGetter = new APIPermissionsGetter(url);
console.log('this._permissionsGetter:', this._permissionsGetter);
this._permissionsPatcher = new APIPermissionsPatcher(url);
}

static getListByUrl = (url) => {
const permissionsGetter = new APIPermissionsGetter(url);
console.log('permissionsGetter:', permissionsGetter);
return (params) => permissionsGetter.getList(params);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const getSingleSignOn = async ({ itemId: id }) => {

try {
const response = await instance.get(url);
console.log(response);
return applyTransform(response.data, [
snakeToCamel(),
merge(defaultObject),
Expand Down
4 changes: 2 additions & 2 deletions src/modules/routing/modules/chat-gateways/api/chatInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import getChatOriginUrl from '../scripts/getChatOriginUrl';

const chatBaseUrl = new URL(path.normalize(import.meta.env.VITE_CHAT_URL), getChatOriginUrl())
.toString();
console.log('Chat instanse')

const chatInstance = axios.create({
...instance.config,
baseURL: chatBaseUrl,
});

// defaultInterceptorsSetup({ instance: chatInstance, config });
console.log('chatInstance:', chatInstance);

export default chatInstance;
export { chatBaseUrl };
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import chatInstance, { chatBaseUrl } from '../../../../api/chatInstance';
const defaultListObject = {
accounts: [],
};
console.log('Facebook');

/* I decided not to use api consumer because they do not
have this flexibility to work with base url and params */
const getList = async ({ uri }) => {
console.log('Facebook get list');
const url = `${uri}?pages=`;
const data = await chatInstance.get(url);
console.log('facebook get list data:', data);
return data.map((item) => ({ ...defaultListObject, ...item }));
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import chatInstance, { chatBaseUrl } from '../../../../api/chatInstance';
const defaultListObject = {
accounts: [],
};
console.log('INSTAGRAM');

/* I decided not to use api consumer because they do not
have this flexibility to work with base url and params */
const getList = async ({ uri }) => {
console.log('INSTAGRAM getList');
const url = `${uri}?instagram=`;
const data = await chatInstance.get(url);
console.log('instagram get list data:', data);
return data.map((item) => ({ ...defaultListObject, ...item }));
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import chatInstance, { chatBaseUrl } from '../../../../api/chatInstance';
const defaultListObject = {
phoneNumbers: [],
};
console.log('whatsapp');

/* I decided not to use api consumer because they do not
have this flexibility to work with base url and params */
const getList = async ({ uri }) => {
const url = `${uri}?whatsapp=`;
const data = await chatInstance.get(url);
console.log('whatsapp get list');
console.log('watsapp get list data:', data);
return data.map((item) => ({ ...defaultListObject, ...item }));
};

Expand Down

0 comments on commit cc63023

Please sign in to comment.