Skip to content

Commit

Permalink
Code symmetry
Browse files Browse the repository at this point in the history
Join GetStream and GetEventsFromStream company.
  • Loading branch information
mostlyobvious committed Jun 20, 2022
1 parent 088c269 commit c5fa819
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ruby_event_store-browser/lib/ruby_event_store/browser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Browser
end
end

require_relative "browser/event"
require_relative "browser/get_event"
require_relative "browser/json_api_event"
require_relative "browser/get_events_from_stream"
require_relative "browser/get_stream"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(event_store_locator:, related_streams_query:, host:, root_path:,
def call(env)
router = Router.new(routing)
router.add_route("GET", "/api/events/:event_id") do |params|
json Event.new(event_store: event_store, event_id: params.fetch("event_id"))
json GetEvent.new(event_store: event_store, event_id: params.fetch("event_id"))
end
router.add_route("GET", "/api/streams/:stream_name") do |params, urls|
json GetStream.new(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module RubyEventStore
module Browser
class Event
class GetEvent
def initialize(event_store:, event_id:)
@event_store = event_store
@event_id = event_id
Expand Down
File renamed without changes.

0 comments on commit c5fa819

Please sign in to comment.