Studio: add delete button for layers

This commit is contained in:
Pieter Vander Vennet 2023-12-02 00:24:55 +01:00
parent 22095f4640
commit eb5cc4d78c
4 changed files with 39 additions and 17 deletions

View file

@ -58,7 +58,14 @@ export default class StudioServer {
return undefined
}
}
async delete(id: string, category: "layers" | "themes") {
if (id === undefined || id === "") {
return
}
await fetch(this.urlFor(id, category), {
method: "DELETE"
})
}
async update(id: string, config: string, category: "layers" | "themes") {
if (id === undefined || id === "") {
return