update to support postgresql and add godocs
This commit is contained in:
@@ -13,7 +13,16 @@ import (
|
||||
models "vctp/server/models"
|
||||
)
|
||||
|
||||
// VmImport is used for bulk import of existing VMs
|
||||
// VmImport ingests a bulk VM import payload.
|
||||
// @Summary Import VMs
|
||||
// @Description Imports existing VM inventory data in bulk.
|
||||
// @Tags inventory
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param import body models.ImportReceived true "Bulk import payload"
|
||||
// @Success 200 {object} map[string]string "Import processed"
|
||||
// @Failure 500 {object} map[string]string "Server error"
|
||||
// @Router /api/import/vm [post]
|
||||
func (h *Handler) VmImport(w http.ResponseWriter, r *http.Request) {
|
||||
// Read request body
|
||||
reqBody, err := io.ReadAll(r.Body)
|
||||
|
||||
Reference in New Issue
Block a user