mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-15 11:37:57 +01:00
Chores: add debug
This commit is contained in:
parent
7131c29d42
commit
b37dcbefe9
@ -332,7 +332,7 @@ export default class RestClient implements Client {
|
|||||||
const maps: MapInfo[] = (data.mindmapsInfo as any[]).map((m) => {
|
const maps: MapInfo[] = (data.mindmapsInfo as any[]).map((m) => {
|
||||||
return {
|
return {
|
||||||
id: m.id,
|
id: m.id,
|
||||||
starred: Boolean(m.starred),
|
starred: m.starred,
|
||||||
title: m.title,
|
title: m.title,
|
||||||
labels: m.labels,
|
labels: m.labels,
|
||||||
createdBy: m.creator,
|
createdBy: m.creator,
|
||||||
@ -347,8 +347,7 @@ export default class RestClient implements Client {
|
|||||||
success(maps);
|
success(maps);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
const response = error.response;
|
const errorInfo = this.parseResponseOnError(error.response);
|
||||||
const errorInfo = this.parseResponseOnError(response);
|
|
||||||
reject(errorInfo);
|
reject(errorInfo);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -429,8 +428,7 @@ export default class RestClient implements Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateStarred(id: number, starred: boolean): Promise<void> {
|
updateStarred(id: number, starred: boolean): Promise<void> {
|
||||||
|
console.debug(`Starred => ${starred}`)
|
||||||
console.debug(`Starred ${starred}`)
|
|
||||||
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
||||||
axios
|
axios
|
||||||
.put(`${this.baseUrl}/c/restful/maps/${id}/starred`, starred, {
|
.put(`${this.baseUrl}/c/restful/maps/${id}/starred`, starred, {
|
||||||
|
Loading…
Reference in New Issue
Block a user