Skip to content

Commit

Permalink
Merge pull request #45 from amirali-ashraf/37-trigger-bulk-event
Browse files Browse the repository at this point in the history
#37 add to_josn for trigger_bulk_event
  • Loading branch information
unicodeveloper authored Jan 19, 2024
2 parents b1b9ff8 + 46afc8e commit a68fa20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/novu/api/events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def trigger_event(body)
# - transactionId [String(optional)] - Transaction id for trigger
# @return [number] status - The status code. Returns 201 if the event has been successfully triggered.
def trigger_bulk_event(body)
post("/events/trigger/bulk", body: body)
post("/events/trigger/bulk", body: body.to_json, headers: {'Content-Type': 'application/json'})
end

# Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.
Expand Down
2 changes: 1 addition & 1 deletion spec/events_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
to: { email: "user2@example.com" }
}
]
}.to_json
}

response_body = {
acknowledged: true,
Expand Down

0 comments on commit a68fa20

Please sign in to comment.