github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/access/rest/routes/node_version_info.go (about)

     1  package routes
     2  
     3  import (
     4  	"github.com/onflow/flow-go/access"
     5  	"github.com/onflow/flow-go/engine/access/rest/models"
     6  	"github.com/onflow/flow-go/engine/access/rest/request"
     7  )
     8  
     9  // GetNodeVersionInfo returns node version information
    10  func GetNodeVersionInfo(r *request.Request, backend access.API, _ models.LinkGenerator) (interface{}, error) {
    11  	params, err := backend.GetNodeVersionInfo(r.Context())
    12  	if err != nil {
    13  		return nil, err
    14  	}
    15  
    16  	var response models.NodeVersionInfo
    17  	response.Build(params)
    18  	return response, nil
    19  }