two/internal/api/agent/vpcs.go
GnomeZworc 9ad407755b
f-21: add first api file
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-04-14 22:00:16 +02:00

19 lines
429 B
Go

package agentapi
import (
"encoding/json"
"net/http"
)
func VpcsHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
switch r.Method {
case http.MethodGet:
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode([]interface{}{})
case http.MethodPost:
w.WriteHeader(http.StatusAccepted)
default:
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
}
}