Skip to content

Commit

Permalink
refactor: rename 'id' to 'projectID' in RenameProject
Browse files Browse the repository at this point in the history
Changed the parameter name 'id' to 'projectID' for clarity and consistency.
  • Loading branch information
jasonuc committed Oct 24, 2024
1 parent 8de247b commit 9aa6dc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ func (g *GormRepository) DeleteProject(projectID uint) error {
}

// RenameProject rename an existing project
func (g *GormRepository) RenameProject(id uint, name string) error {
func (g *GormRepository) RenameProject(projectID uint, name string) error {
var newProject Project
if err := g.DB.Where("id = ?", id).First(&newProject).Error; err != nil {
if err := g.DB.Where("id = ?", projectID).First(&newProject).Error; err != nil {
return fmt.Errorf("Unable to rename project: %w", err)
}
newProject.Name = name
Expand Down

0 comments on commit 9aa6dc8

Please sign in to comment.