From b6be7fa967d3781f7613ec1a0f44132512e9b898 Mon Sep 17 00:00:00 2001 From: vanppo Date: Wed, 23 Oct 2024 11:13:21 +0800 Subject: [PATCH] fixup! [JET-2026] feature: use dynamic repo to execute action (#8) --- lib/resource_kit/repo.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/resource_kit/repo.ex b/lib/resource_kit/repo.ex index ff43b2b..513e628 100644 --- a/lib/resource_kit/repo.ex +++ b/lib/resource_kit/repo.ex @@ -11,13 +11,13 @@ defmodule ResourceKit.Repo do @spec execute(dynamic_repo :: dynamic_repo(), callback :: (Ecto.Repo.t() -> result)) :: result when result: var def execute(dynamic_repo, callback) do - default = @adapter.get_dynamic_repo() + default = adapter().get_dynamic_repo() try do - @adapter.put_dynamic_repo(dynamic_repo) + adapter().put_dynamic_repo(dynamic_repo) callback.(@adapter) after - @adapter.put_dynamic_repo(default) + adapter().put_dynamic_repo(default) end end end