Skip to content

Commit

Permalink
feat(api): [KDL6-124] update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
igzjaviergil committed Jan 29, 2025
1 parent 2225a86 commit 57961a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/api/usecase/project/interactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func (i *interactor) SaveUserActivity(ctx context.Context, userActivity entity.U
// Update changes the desired information about a project.
func (i *interactor) Update(ctx context.Context, opt UpdateProjectOption) (entity.Project, error) {
p, _ := i.projectRepo.Get(ctx, opt.ProjectID)

userActivity := entity.UserActivity{
Date: i.clock.Now(),
UserID: opt.UserID,
Expand Down Expand Up @@ -228,7 +229,7 @@ func (i *interactor) Update(ctx context.Context, opt UpdateProjectOption) (entit
return entity.Project{}, err
}

// Save project name updated in user activity
// Save project description updated in user activity
userActivity.Type = entity.UserActivityTypeUpdateProjectDescription
userActivity.Vars = entity.NewActivityVarsUpdateProjectInfo(opt.ProjectID, p.Description, *opt.Description)
err = i.SaveUserActivity(ctx, userActivity)
Expand All @@ -244,7 +245,7 @@ func (i *interactor) Update(ctx context.Context, opt UpdateProjectOption) (entit
return entity.Project{}, err
}

// Save project name updated in user activity
// Save project archived updated in user activity
userActivity.Type = entity.UserActivityTypeUpdateProjectArchived
userActivity.Vars = entity.NewActivityVarsUpdateProjectInfo(
opt.ProjectID,
Expand Down

0 comments on commit 57961a3

Please sign in to comment.