优化API命名

This commit is contained in:
刘祥超
2021-05-25 17:48:51 +08:00
parent cc76172a46
commit b57b242232
35 changed files with 114 additions and 114 deletions

View File

@@ -19,12 +19,12 @@ func (this *UpdatePopupAction) Init() {
func (this *UpdatePopupAction) RunGet(params struct {
GroupId int64
}) {
groupResp, err := this.RPC().ServerGroupRPC().FindEnabledServerGroup(this.AdminContext(), &pb.FindEnabledServerGroupRequest{GroupId: params.GroupId})
groupResp, err := this.RPC().ServerGroupRPC().FindEnabledServerGroup(this.AdminContext(), &pb.FindEnabledServerGroupRequest{ServerGroupId: params.GroupId})
if err != nil {
this.ErrorPage(err)
return
}
group := groupResp.Group
group := groupResp.ServerGroup
if group == nil {
this.NotFound("serverGroup", params.GroupId)
return
@@ -51,8 +51,8 @@ func (this *UpdatePopupAction) RunPost(params struct {
Field("name", params.Name).
Require("请输入分组名称")
_, err := this.RPC().ServerGroupRPC().UpdateServerGroup(this.AdminContext(), &pb.UpdateServerGroupRequest{
GroupId: params.GroupId,
Name: params.Name,
ServerGroupId: params.GroupId,
Name: params.Name,
})
if err != nil {
this.ErrorPage(err)