初步实现安装界面

This commit is contained in:
GoEdgeLab
2020-10-13 20:05:13 +08:00
parent 911e57b1f2
commit 23c0200e73
76 changed files with 2550 additions and 88 deletions

View File

@@ -2,6 +2,7 @@ package services
import (
"context"
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
rpcutils "github.com/TeaOSLab/EdgeAPI/internal/rpc/utils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
@@ -180,3 +181,13 @@ func (this *APINodeService) FindEnabledAPINode(ctx context.Context, req *pb.Find
}
return &pb.FindEnabledAPINodeResponse{Node: result}, nil
}
// 获取当前API节点的版本
func (this *APINodeService) FindCurrentAPINodeVersion(ctx context.Context, req *pb.FindCurrentAPINodeVersionRequest) (*pb.FindCurrentAPINodeVersionResponse, error) {
_, _, err := rpcutils.ValidateRequest(ctx)
if err != nil {
return nil, err
}
return &pb.FindCurrentAPINodeVersionResponse{Version: teaconst.Version}, nil
}