At the moment, if there is model data available, a closure provided to the HasVisibility modifier will receive both the model and the API context, while no model data results in only the API context.
Right now, we can't define the closure as fn (Context $c) => ... since the model, if available, is set to the first param.
Instead of having a throwaway parameter to the closure, could we swap these params so that the context is always first and the model is second, if available? It would simplify the function signatures a lot as my use case doesn't have differing visibility of models per-user, for example.
At the moment, if there is model data available, a closure provided to the
HasVisibility
modifier will receive both the model and the API context, while no model data results in only the API context.Right now, we can't define the closure as
fn (Context $c) => ...
since the model, if available, is set to the first param.Instead of having a throwaway parameter to the closure, could we swap these params so that the context is always first and the model is second, if available? It would simplify the function signatures a lot as my use case doesn't have differing visibility of models per-user, for example.