bookmarks!
This commit is contained in:
@ -15,6 +15,10 @@ defmodule SomethingErlang.Grover do
|
||||
GenServer.call(via(self()), {:show_thread, thread_id, page_number})
|
||||
end
|
||||
|
||||
def get_bookmarks!(page_number) do
|
||||
GenServer.call(via(self()), {:show_bookmarks, page_number})
|
||||
end
|
||||
|
||||
def start_link([lv_pid, user]) do
|
||||
GenServer.start_link(
|
||||
__MODULE__,
|
||||
@ -41,6 +45,12 @@ defmodule SomethingErlang.Grover do
|
||||
{:reply, thread, state}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_call({:show_bookmarks, _page_number}, _from, state) do
|
||||
bookmarks = AwfulApi.bookmarks(state.user)
|
||||
{:reply, bookmarks, state}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_info({:DOWN, _ref, :process, _object, reason}, state) do
|
||||
Logger.debug "received :DOWN from: #{inspect(state.lv_pid)} reason: #{inspect(reason)}"
|
||||
|
Reference in New Issue
Block a user