cover/Elixir.WalletJourney.Queries.GetJourneyState.html| 1 | defmodule WalletJourney.Queries.GetJourneyState do |
|
| 2 | @moduledoc """ |
|
| 3 | Query handler for retrieving the current state of a journey by ID. |
|
| 4 | """ |
|
| 5 | |
|
| 6 | alias WalletJourney.JourneyStore |
|
| 7 | |
|
| 8 | @doc """ |
|
| 9 | Returns the current journey state for the given journey_id. |
|
| 10 | |
|
| 11 | Returns `{:ok, journey}` or `{:error, :not_found}`. |
|
| 12 | """ |
|
| 13 | @spec execute(journey_id :: String.t()) :: {:ok, term()} | {:error, :not_found} |
|
| 14 | def execute(journey_id) do |
|
| 15 | 3 | JourneyStore.get(journey_id) |
| 16 | end |
|
| 17 | end |
|
| Line | Hits | Source |
|---|