refactor: use the correct variable naming

This commit is contained in:
dineshsalunke
2024-01-22 10:42:22 +05:30
parent f34c05259d
commit 2ebe4f0514

View File

@@ -24,14 +24,14 @@ func innerCreateProject(ctx *context.APIContext, projectType project_model.Type)
Description: form.Description, Description: form.Description,
CreatorID: ctx.Doer.ID, CreatorID: ctx.Doer.ID,
BoardType: project_model.BoardType(form.BoardType), BoardType: project_model.BoardType(form.BoardType),
Type: project_type, Type: projectType,
} }
if ctx.ContextUser != nil { if ctx.ContextUser != nil {
project.OwnerID = ctx.ContextUser.ID project.OwnerID = ctx.ContextUser.ID
} }
if project_type == project_model.TypeRepository { if projectType == project_model.TypeRepository {
project.RepoID = ctx.Repo.Repository.ID project.RepoID = ctx.Repo.Repository.ID
} }
@@ -239,7 +239,6 @@ func DeleteProject(ctx *context.APIContext) {
} }
ctx.Status(http.StatusNoContent) ctx.Status(http.StatusNoContent)
} }
func ListUserProjects(ctx *context.APIContext) { func ListUserProjects(ctx *context.APIContext) {