@@ -68,51 +68,6 @@ defmodule Algora.Bounties.Bounty do
68
68
|> String . replace ( ~r/ \/ (issues|pull|discussions)\/ / , "#" )
69
69
end
70
70
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
-
116
71
def order_by_most_recent ( query \\ Bounty ) do
117
72
from ( b in query , order_by: [ desc: b . inserted_at ] )
118
73
end
@@ -121,14 +76,6 @@ defmodule Algora.Bounties.Bounty do
121
76
from ( b in query , limit: ^ limit )
122
77
end
123
78
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
-
132
79
def filter_by_tech_stack ( query , [ ] ) , do: query
133
80
def filter_by_tech_stack ( query , nil ) , do: query
134
81
0 commit comments