Skip to content

Commit

Permalink
Merge pull request #3 from WomenWhoGoTokyo/fix-update-statement
Browse files Browse the repository at this point in the history
fixed UPDATE statement
  • Loading branch information
mi-bear authored Dec 23, 2020
2 parents 64c408e + db8c45a commit b50fc47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interface/repository/diary_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (dr *diaryRepository) Store(ctx context.Context, diary *model.Diary) (*mode
}

func (dr *diaryRepository) Update(ctx context.Context, diary *model.Diary) (*model.Diary, error) {
s := `UPDATE diaries SET title = $1 and description = $2 WHERE id = $3`
s := `UPDATE diaries SET title = $1, description = $2 WHERE id = $3`
result, err := dr.db.ExecContext(ctx, s,
diary.Title,
diary.Description,
Expand Down

0 comments on commit b50fc47

Please sign in to comment.