Skip to content

Commit c3b874e

Browse files
committed
minor fixes
1 parent 05c9e42 commit c3b874e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/algora/bounties/bounties.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ defmodule Algora.Bounties do
2727
def base_query, do: Bounty
2828

2929
@type criterion ::
30-
{:limit, non_neg_integer() | :infinity}
30+
{:id, String.t()}
31+
| {:limit, non_neg_integer() | :infinity}
3132
| {:ticket_id, String.t()}
3233
| {:owner_id, String.t()}
3334
| {:status, :open | :paid}
@@ -998,6 +999,9 @@ defmodule Algora.Bounties do
998999
@spec apply_criteria(Ecto.Queryable.t(), [criterion()]) :: Ecto.Queryable.t()
9991000
defp apply_criteria(query, criteria) do
10001001
Enum.reduce(criteria, query, fn
1002+
{:id, id}, query ->
1003+
from([b] in query, where: b.id == ^id)
1004+
10011005
{:limit, :infinity}, query ->
10021006
query
10031007

lib/algora_web/live/og/bounty_live.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ defmodule AlgoraWeb.OG.BountyLive do
3131
<div class="flex flex-col items-center text-center">
3232
<div class="relative">
3333
<img
34-
src={@bounty.owner.avatar_url}
34+
src={@bounty.repository.owner.avatar_url}
3535
class="relative h-40 w-40 rounded-full bg-black"
3636
alt="Algora"
3737
/>
3838
</div>
3939
<div class="mt-4 flex flex-col items-center font-display">
4040
<p class="text-7xl font-semibold text-foreground">
41-
{@bounty.owner.name}
41+
{@bounty.repository.owner.name}
4242
</p>
4343
<h1 class="mt-4 text-8xl font-extrabold tracking-tight text-white">
4444
<span class="text-emerald-400">

0 commit comments

Comments
 (0)