From b37dcbefe99f49dbf7145ef2fceab3e5cd469545 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 1 Mar 2021 18:06:20 -0800 Subject: [PATCH] Chores: add debug --- packages/webapp/src/classes/client/rest-client/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/webapp/src/classes/client/rest-client/index.ts b/packages/webapp/src/classes/client/rest-client/index.ts index aa62bc75..374fb622 100644 --- a/packages/webapp/src/classes/client/rest-client/index.ts +++ b/packages/webapp/src/classes/client/rest-client/index.ts @@ -332,7 +332,7 @@ export default class RestClient implements Client { const maps: MapInfo[] = (data.mindmapsInfo as any[]).map((m) => { return { id: m.id, - starred: Boolean(m.starred), + starred: m.starred, title: m.title, labels: m.labels, createdBy: m.creator, @@ -347,8 +347,7 @@ export default class RestClient implements Client { success(maps); }) .catch((error) => { - const response = error.response; - const errorInfo = this.parseResponseOnError(response); + const errorInfo = this.parseResponseOnError(error.response); reject(errorInfo); }); }; @@ -429,8 +428,7 @@ export default class RestClient implements Client { } updateStarred(id: number, starred: boolean): Promise { - - console.debug(`Starred ${starred}`) + console.debug(`Starred => ${starred}`) const handler = (success: () => void, reject: (error: ErrorInfo) => void) => { axios .put(`${this.baseUrl}/c/restful/maps/${id}/starred`, starred, {