feat: 添加数据库资产、命令拦截器、授权资产等功能,修复GitHub Actions工作流
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"next-terminal/server/common"
|
||||
"next-terminal/server/common/maps"
|
||||
"next-terminal/server/model"
|
||||
"next-terminal/server/repository"
|
||||
@@ -43,6 +44,8 @@ func (api GatewayGroupApi) CreateEndpoint(c echo.Context) error {
|
||||
return err
|
||||
}
|
||||
item.ID = utils.UUID()
|
||||
item.Created = common.NowJsonTime()
|
||||
item.Updated = common.NowJsonTime()
|
||||
|
||||
if err := repository.GatewayGroupRepository.Create(context.TODO(), &item); err != nil {
|
||||
return err
|
||||
@@ -56,6 +59,7 @@ func (api GatewayGroupApi) UpdateEndpoint(c echo.Context) error {
|
||||
if err := c.Bind(&item); err != nil {
|
||||
return err
|
||||
}
|
||||
item.Updated = common.NowJsonTime()
|
||||
if err := repository.GatewayGroupRepository.UpdateById(context.TODO(), &item, id); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user