feat: 添加操作日志拦截中间件

This commit is contained in:
ssongliu
2022-12-13 18:54:28 +08:00
committed by ssongliu
parent 5272d44558
commit 2a0f2dcd6a
59 changed files with 1162 additions and 437 deletions

View File

@@ -86,11 +86,6 @@ func (b *BaseApi) UpdateRepo(c *gin.Context) {
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, err)
return
}
id, err := helper.GetParamID(c)
if err != nil {
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, err)
return
}
upMap := make(map[string]interface{})
upMap["download_url"] = req.DownloadUrl
@@ -98,7 +93,7 @@ func (b *BaseApi) UpdateRepo(c *gin.Context) {
upMap["username"] = req.Username
upMap["password"] = req.Password
upMap["auth"] = req.Auth
if err := imageRepoService.Update(id, upMap); err != nil {
if err := imageRepoService.Update(req.ID, upMap); err != nil {
helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err)
return
}