Skip to content

Commit

Permalink
fix update game id not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacky CSL authored and Jacky CSL committed Feb 15, 2022
1 parent d3767b3 commit 8f5ca0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions catalog-service/internal/biz/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ func (uc *GameUseCase) Get(ctx context.Context, id int64) (*Game, error) {
}

func (uc *GameUseCase) Update(ctx context.Context, u *Game) (*Game, error) {
_, err := uc.repo.GetGame(ctx, u.Id)
if err != nil {
return nil, err
}
g, err := uc.repo.KafkaUpdateGame(ctx, u)
if err != nil {
return nil, err
Expand Down

0 comments on commit 8f5ca0b

Please sign in to comment.