Skip to content

Commit

Permalink
fix webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
fuji8 committed May 28, 2021
1 parent 1d70db8 commit 3f05299
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions usecase/production/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func (repo *Repository) CreateEvent(params domain.WriteEventParams, info *domain.ConInfo) (*domain.Event, error) {
// groupの確認
_, err := repo.GetGroup(params.GroupID, info)
group, err := repo.GetGroup(params.GroupID, info)
if err != nil {
return nil, defaultErrorHandling(err)
}
Expand All @@ -23,6 +23,7 @@ func (repo *Repository) CreateEvent(params domain.WriteEventParams, info *domain
return nil, defaultErrorHandling(err)
}
e := db.ConvEventTodomainEvent(*event)
e.Group = *group
return &e, nil
}

Expand All @@ -31,7 +32,7 @@ func (repo *Repository) UpdateEvent(eventID uuid.UUID, params domain.WriteEventP
return nil, domain.ErrForbidden
}
// groupの確認
_, err := repo.GetGroup(params.GroupID, info)
group, err := repo.GetGroup(params.GroupID, info)
if err != nil {
return nil, defaultErrorHandling(err)
}
Expand All @@ -45,6 +46,7 @@ func (repo *Repository) UpdateEvent(eventID uuid.UUID, params domain.WriteEventP
return nil, defaultErrorHandling(err)
}
e := db.ConvEventTodomainEvent(*event)
e.Group = *group
return &e, nil
}

Expand Down

0 comments on commit 3f05299

Please sign in to comment.