mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
bug: Fix starred rest issue on empty return
This commit is contained in:
parent
efc581279b
commit
420262abd4
@ -436,7 +436,7 @@ export default class RestClient implements Client {
|
|||||||
updateStarred(id: number, starred: boolean): Promise<void> {
|
updateStarred(id: number, starred: boolean): Promise<void> {
|
||||||
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`, Boolean(starred), {
|
||||||
headers: { 'Content-Type': 'text/plain' },
|
headers: { 'Content-Type': 'text/plain' },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user