Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -81,7 +81,7 @@ func (s *BeadsService) GetComments(ctx context.Context, issueID string) ([]model
|
|||||||
func (s *BeadsService) AddComment(ctx context.Context, issueID, author, text string) (*models.Comment, error) {
|
func (s *BeadsService) AddComment(ctx context.Context, issueID, author, text string) (*models.Comment, error) {
|
||||||
query := `INSERT INTO comments (issue_id, author, text, created_at) VALUES (?, ?, ?, ?)`
|
query := `INSERT INTO comments (issue_id, author, text, created_at) VALUES (?, ?, ?, ?)`
|
||||||
|
|
||||||
createdAt := time.Now()
|
createdAt := time.Now().UTC()
|
||||||
result, err := s.UnderlyingDB().ExecContext(ctx, query, issueID, author, text, createdAt)
|
result, err := s.UnderlyingDB().ExecContext(ctx, query, issueID, author, text, createdAt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user