feat: sqlite storage

This commit is contained in:
Nicolas Meienberger
2025-08-09 19:54:29 +02:00
parent 388114d536
commit d0bf890386
14 changed files with 189 additions and 26 deletions

View File

@@ -3,6 +3,7 @@ package driver
import (
"encoding/json"
"ironmount/internal/constants"
"ironmount/internal/db"
"log"
"net/http"
"os"
@@ -24,12 +25,13 @@ func Create(w http.ResponseWriter, r *http.Request) {
return
}
db.CreateVolume(req.Name, volPath)
response := map[string]string{
"Name": req.Name,
"Mountpoint": volPath,
"Err": "",
}
volumes[req.Name] = Volume{Name: req.Name, Path: volPath}
_ = json.NewEncoder(w).Encode(response)
}