lint error fixed.

This commit is contained in:
truecode112
2023-05-16 11:15:54 +03:00
parent c55ccfdb48
commit 9e5f2fd4e3
5 changed files with 8 additions and 11 deletions
+2 -3
View File
@@ -49,7 +49,7 @@ func UpdateRepoPost(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.repositories")
ctx.Data["PageIsAdminRepositories"] = true
repo_size_limit, err := base.GetFileSize(form.RepoSizeLimit)
repoSizeLimit, err := base.GetFileSize(form.RepoSizeLimit)
ctx.Data["EnableSizeLimit"] = form.EnableSizeLimit
ctx.Data["RepoSizeLimit"] = form.RepoSizeLimit
@@ -65,7 +65,7 @@ func UpdateRepoPost(ctx *context.Context) {
return
}
err = setting.SaveGlobalRepositorySetting(form.EnableSizeLimit, repo_size_limit)
err = setting.SaveGlobalRepositorySetting(form.EnableSizeLimit, repoSizeLimit)
if err != nil {
ctx.Data["Err_Repo_Size_Save"] = err.Error()
@@ -80,7 +80,6 @@ func UpdateRepoPost(ctx *context.Context) {
ctx.Flash.Success(ctx.Tr("admin.config.repository_setting_success"))
ctx.Redirect(setting.AppSubURL + "/admin/repos")
}
// DeleteRepo delete one repository
-1
View File
@@ -23,5 +23,4 @@ func TestUpdateRepoPost(t *testing.T) {
UpdateRepoPost(ctx)
assert.NotEmpty(t, ctx.Flash.ErrorMsg)
}