bug: Fix starred rest issue on empty return

This commit is contained in:
Paulo Gustavo Veiga 2021-02-28 08:09:40 -08:00
parent efc581279b
commit 420262abd4

View File

@ -436,7 +436,7 @@ export default class RestClient implements Client {
updateStarred(id: number, starred: boolean): Promise<void> {
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
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' },
})
.then(() => {