pattern match on user struct in more cases

This commit is contained in:
2023-05-12 21:48:19 -04:00
parent 8a58d53dc1
commit 49628cb9bb
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ defmodule Cannery.ActivityLog do
@spec list_shot_records(Type.class() | :all, User.t()) :: [ShotRecord.t()]
@spec list_shot_records(search :: nil | String.t(), Type.class() | :all, User.t()) ::
[ShotRecord.t()]
def list_shot_records(search \\ nil, type, %{id: user_id}) do
def list_shot_records(search \\ nil, type, %User{id: user_id}) do
from(sg in ShotRecord,
as: :sg,
left_join: p in Pack,