f-28: add vpc cidr field

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-05-18 22:47:28 +02:00
commit 76a840b80a
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
8 changed files with 98 additions and 17 deletions

View file

@ -35,8 +35,9 @@ func (s *Server) getVpc(w http.ResponseWriter, _ *http.Request, name string) {
json.NewEncoder(w).Encode(ErrorResponse{Error: "vpc not found"})
return
}
cidr, _ := kv.GetFromDB(s.db, "vpc/"+name+"/cidr")
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(VPC{Name: name, State: state})
json.NewEncoder(w).Encode(VPC{Name: name, State: state, CIDR: cidr})
}
func (s *Server) deleteVpc(w http.ResponseWriter, _ *http.Request, name string) {