@@ -68,51 +68,6 @@ defmodule Algora.Bounties.Bounty do
6868 |> String . replace ( ~r/ \/ (issues|pull|discussions)\/ / , "#" )
6969 end
7070
71- def open ( query \\ Bounty ) do
72- from b in query ,
73- as: :bounties ,
74- where:
75- not exists (
76- from (
77- t in Transaction ,
78- where:
79- parent_as ( :bounties ) . id == t . bounty_id and
80- not is_nil ( t . succeeded_at ) and
81- t . type == :transfer
82- )
83- )
84- end
85-
86- def completed ( query \\ Bounty ) do
87- from b in query ,
88- as: :bounties ,
89- where:
90- exists (
91- from (
92- t in Transaction ,
93- where:
94- parent_as ( :bounties ) . id == t . bounty_id and
95- not is_nil ( t . succeeded_at ) and
96- t . type == :transfer
97- )
98- )
99- end
100-
101- def rewarded ( query \\ Bounty ) do
102- from b in query ,
103- as: :bounties ,
104- where:
105- exists (
106- from (
107- t in Transaction ,
108- where:
109- parent_as ( :bounties ) . id == t . bounty_id and
110- not is_nil ( t . succeeded_at ) and
111- t . type == :transfer
112- )
113- )
114- end
115-
11671 def order_by_most_recent ( query \\ Bounty ) do
11772 from ( b in query , order_by: [ desc: b . inserted_at ] )
11873 end
@@ -121,14 +76,6 @@ defmodule Algora.Bounties.Bounty do
12176 from ( b in query , limit: ^ limit )
12277 end
12378
124- def filter_by_org_id ( query , nil ) , do: query
125-
126- def filter_by_org_id ( query , org_id ) do
127- from b in query ,
128- join: u in assoc ( b , :owner ) ,
129- where: u . id == ^ org_id
130- end
131-
13279 def filter_by_tech_stack ( query , [ ] ) , do: query
13380 def filter_by_tech_stack ( query , nil ) , do: query
13481
0 commit comments