From 2ebe4f05142e325fe46c1c4bdf2d6803fc1e0eef Mon Sep 17 00:00:00 2001 From: dineshsalunke Date: Mon, 22 Jan 2024 10:42:22 +0530 Subject: [PATCH] refactor: use the correct variable naming --- routers/api/v1/projects/project.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/projects/project.go b/routers/api/v1/projects/project.go index c6aed4f0cf..da07aab42f 100644 --- a/routers/api/v1/projects/project.go +++ b/routers/api/v1/projects/project.go @@ -24,14 +24,14 @@ func innerCreateProject(ctx *context.APIContext, projectType project_model.Type) Description: form.Description, CreatorID: ctx.Doer.ID, BoardType: project_model.BoardType(form.BoardType), - Type: project_type, + Type: projectType, } if ctx.ContextUser != nil { project.OwnerID = ctx.ContextUser.ID } - if project_type == project_model.TypeRepository { + if projectType == project_model.TypeRepository { project.RepoID = ctx.Repo.Repository.ID } @@ -239,7 +239,6 @@ func DeleteProject(ctx *context.APIContext) { } ctx.Status(http.StatusNoContent) - } func ListUserProjects(ctx *context.APIContext) {