diff --git a/packages/webapp/src/classes/client/mock-client/index.ts b/packages/webapp/src/classes/client/mock-client/index.ts index c9646ec7..8a32bc79 100644 --- a/packages/webapp/src/classes/client/mock-client/index.ts +++ b/packages/webapp/src/classes/client/mock-client/index.ts @@ -104,7 +104,7 @@ class MockClient implements Client { perm = perm.concat(permissions); this.permissionsByMap.set(id, perm); - console.log(`Message ${message}`); + console.debug(`Message ${message}`); return Promise.resolve(); } diff --git a/packages/webapp/src/classes/client/rest-client/index.ts b/packages/webapp/src/classes/client/rest-client/index.ts index 87f8dcc5..aa62bc75 100644 --- a/packages/webapp/src/classes/client/rest-client/index.ts +++ b/packages/webapp/src/classes/client/rest-client/index.ts @@ -347,9 +347,6 @@ export default class RestClient implements Client { success(maps); }) .catch((error) => { - console.log('Maps List Error=>'); - console.log(error); - const response = error.response; const errorInfo = this.parseResponseOnError(response); reject(errorInfo); @@ -369,9 +366,7 @@ export default class RestClient implements Client { success(); }) .catch((error) => { - console.log(error); - const response = error.response; - const errorInfo = this.parseResponseOnError(response); + const errorInfo = this.parseResponseOnError(error.response); reject(errorInfo); }); }; @@ -500,11 +495,13 @@ export default class RestClient implements Client { // eslint-disable-next-line @typescript-eslint/no-explicit-any private parseResponseOnError = (response: any): ErrorInfo => { + console.error("Backend error=>"); + console.error(response.data); + let result: ErrorInfo | undefined; if (response) { const status: number = response.status; const data = response.data; - console.log(data); switch (status) { case 401: diff --git a/packages/webapp/src/components/maps-page/maps-list/index.tsx b/packages/webapp/src/components/maps-page/maps-list/index.tsx index 3bf1526f..e7ea7043 100644 --- a/packages/webapp/src/components/maps-page/maps-list/index.tsx +++ b/packages/webapp/src/components/maps-page/maps-list/index.tsx @@ -344,7 +344,7 @@ export const MapsList = (props: MapsListProps): React.ReactElement => { } console.debug(`Starred value map?.starred: ${map?.starred}`); - return client.updateStarred(id, !map?.starred); + return client.updateStarred(id, !(map?.starred)); }, { onSuccess: () => {