File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -215,8 +215,9 @@ defmodule Kaffy.Utils do
215
215
"""
216
216
@ spec get_resource ( Plug.Conn . t ( ) , String . t ( ) , String . t ( ) ) :: list ( )
217
217
def get_resource ( conn , context , resource ) do
218
+ preloaded_resources = full_resources ( conn )
218
219
{ context , resource } = convert_to_atoms ( context , resource )
219
- get_in ( full_resources ( conn ) , [ context , :resources , resource ] )
220
+ get_in ( preloaded_resources , [ context , :resources , resource ] )
220
221
end
221
222
222
223
@ doc """
@@ -232,8 +233,9 @@ defmodule Kaffy.Utils do
232
233
"""
233
234
@ spec schemas_for_context ( Plug.Conn . t ( ) , list ( ) ) :: list ( )
234
235
def schemas_for_context ( conn , context ) do
236
+ preloaded_resources = full_resources ( conn )
235
237
context = convert_to_atom ( context )
236
- get_in ( full_resources ( conn ) , [ context , :resources ] )
238
+ get_in ( preloaded_resources , [ context , :resources ] )
237
239
end
238
240
239
241
# @doc """
You can’t perform that action at this time.
0 commit comments