Fix delete map from label

This commit is contained in:
Paulo Gustavo Veiga 2022-02-09 14:17:42 -08:00
parent 0ff82735ba
commit 0e54c6bc78

View File

@ -559,13 +559,10 @@ export default class RestClient implements Client {
return new Promise(handler);
}
// TODO: not working (error 500: missing lid param)
deleteLabelFromMap(labelId: number, mapId: number): Promise<void> {
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
axios
.delete(`${this.baseUrl}/c/restful/maps/${mapId}/labels/${labelId}`, {
data: JSON.stringify(labelId)
})
.delete(`${this.baseUrl}/c/restful/maps/${mapId}/labels/${labelId}`)
.then(() => {
success();
})