forked from MapComplete/MapComplete
Studio: add delete button for layers
This commit is contained in:
parent
22095f4640
commit
eb5cc4d78c
4 changed files with 39 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue