An Elixir toolkit for the AT Protocol. hexdocs.pm/atex
elixir bluesky atproto decentralization
25
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor!: rename `Atex.XRPC.OAuthClient.update_plug/2` to `update_conn/2`

+8 -3
+5
CHANGELOG.md
··· 8 8 9 9 ## [Unreleased] 10 10 11 + ### Breaking Changes 12 + 13 + - Rename `Atex.XRPC.OAuthClient.update_plug/2` to `update_conn/2`, to match the 14 + naming of `from_conn/1`. 15 + 11 16 ### Added 12 17 13 18 - `Atex.OAuth.Plug` now requires a `:callback` option that is a MFA tuple
+1 -1
examples/oauth.ex
··· 57 57 IO.inspect(response, label: "output") 58 58 59 59 conn 60 - |> XRPC.OAuthClient.update_plug(client) 60 + |> XRPC.OAuthClient.update_conn(client) 61 61 |> send_resp(200, response.uri) 62 62 else 63 63 :error ->
+2 -2
lib/atex/xrpc/oauth_client.ex
··· 79 79 Ideally should be called at the end of routes where XRPC calls occur, in case 80 80 the client has transparently refreshed, so that the user is always up to date. 81 81 """ 82 - @spec update_plug(Plug.Conn.t(), t()) :: Plug.Conn.t() 83 - def update_plug(%Plug.Conn{} = conn, %__MODULE__{} = client) do 82 + @spec update_conn(Plug.Conn.t(), t()) :: Plug.Conn.t() 83 + def update_conn(%Plug.Conn{} = conn, %__MODULE__{} = client) do 84 84 Plug.Conn.put_session(conn, :atex_oauth, %{ 85 85 access_token: client.access_token, 86 86 refresh_token: client.refresh_token,