Skip to content

Commit

Permalink
chore: use find instead of first
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Jun 5, 2024
1 parent fec8a05 commit 42c212b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/nostr/nostr.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (svc *Service) NIP47Handler(c echo.Context) error {
"relayUrl": requestData.RelayUrl,
}).Info("Processing request event")

if svc.db.Where("nostr_id = ?", requestData.SignedEvent.ID).First(&RequestEvent{}).RowsAffected != 0 {
if svc.db.Where("nostr_id = ?", requestData.SignedEvent.ID).Find(&RequestEvent{}).RowsAffected != 0 {
return c.JSON(http.StatusBadRequest, NIP47Response{
State: EVENT_ALREADY_PROCESSED,
})
Expand Down

0 comments on commit 42c212b

Please sign in to comment.