feat: missing endpoints

This commit is contained in:
Nicolas Meienberger
2025-08-09 18:30:33 +02:00
parent 065c629ba8
commit 388114d536
4 changed files with 67 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ func Create(w http.ResponseWriter, r *http.Request) {
var req struct {
Name string
Opts map[string]string `json:"Opts,omitempty"`
}
_ = json.NewDecoder(r.Body).Decode(&req)
@@ -23,6 +24,12 @@ func Create(w http.ResponseWriter, r *http.Request) {
return
}
response := map[string]string{
"Name": req.Name,
"Mountpoint": volPath,
"Err": "",
}
volumes[req.Name] = Volume{Name: req.Name, Path: volPath}
_ = json.NewEncoder(w).Encode(map[string]string{"Err": ""})
_ = json.NewEncoder(w).Encode(response)
}