mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-04 07:36:57 +08:00
bug fix
This commit is contained in:
@@ -12,7 +12,8 @@ type procApi struct{}
|
||||
|
||||
var ProcApi = new(procApi)
|
||||
|
||||
func (p *procApi) CreateNewProcess(ctx *gin.Context, req model.Process) {
|
||||
func (p *procApi) CreateNewProcess(ctx *gin.Context) {
|
||||
req := bind[model.Process](ctx)
|
||||
index, err := repository.ProcessRepository.AddProcessConfig(req)
|
||||
errCheck(ctx, err != nil, err)
|
||||
req.Uuid = index
|
||||
@@ -83,7 +84,8 @@ func (p *procApi) GetProcessList(ctx *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *procApi) UpdateProcessConfig(ctx *gin.Context, req model.Process) {
|
||||
func (p *procApi) UpdateProcessConfig(ctx *gin.Context) {
|
||||
req := bind[model.Process](ctx)
|
||||
logic.ProcessCtlLogic.UpdateProcessConfig(req)
|
||||
err := repository.ProcessRepository.UpdateProcessConfig(req)
|
||||
errCheck(ctx, err != nil, err)
|
||||
|
Reference in New Issue
Block a user