@@ -53,7 +53,8 @@ defmodule Algora.Bounties do
53
53
visibility: Bounty . visibility ( ) ,
54
54
shared_with: [ String . t ( ) ] ,
55
55
hours_per_week: integer ( ) | nil ,
56
- hourly_rate: Money . t ( ) | nil
56
+ hourly_rate: Money . t ( ) | nil ,
57
+ contract_type: Bounty . contract_type ( ) | nil
57
58
} ) ::
58
59
{ :ok , Bounty . t ( ) } | { :error , atom ( ) }
59
60
defp do_create_bounty ( % { creator: creator , owner: owner , amount: amount , ticket: ticket } = params ) do
@@ -66,7 +67,8 @@ defmodule Algora.Bounties do
66
67
visibility: params [ :visibility ] || owner . bounty_mode ,
67
68
shared_with: params [ :shared_with ] || [ ] ,
68
69
hours_per_week: params [ :hours_per_week ] ,
69
- hourly_rate: params [ :hourly_rate ]
70
+ hourly_rate: params [ :hourly_rate ] ,
71
+ contract_type: params [ :contract_type ]
70
72
} )
71
73
72
74
changeset
@@ -115,7 +117,8 @@ defmodule Algora.Bounties do
115
117
visibility: Bounty . visibility ( ) | nil ,
116
118
shared_with: [ String . t ( ) ] | nil ,
117
119
hourly_rate: Money . t ( ) | nil ,
118
- hours_per_week: integer ( ) | nil
120
+ hours_per_week: integer ( ) | nil ,
121
+ contract_type: Bounty . contract_type ( ) | nil
119
122
]
120
123
) ::
121
124
{ :ok , Bounty . t ( ) } | { :error , atom ( ) }
@@ -148,7 +151,8 @@ defmodule Algora.Bounties do
148
151
visibility: opts [ :visibility ] ,
149
152
shared_with: shared_with ,
150
153
hourly_rate: opts [ :hourly_rate ] ,
151
- hours_per_week: opts [ :hours_per_week ]
154
+ hours_per_week: opts [ :hours_per_week ] ,
155
+ contract_type: opts [ :contract_type ]
152
156
} )
153
157
154
158
:set ->
@@ -200,7 +204,8 @@ defmodule Algora.Bounties do
200
204
visibility: Bounty . visibility ( ) | nil ,
201
205
shared_with: [ String . t ( ) ] | nil ,
202
206
hours_per_week: integer ( ) | nil ,
203
- hourly_rate: Money . t ( ) | nil
207
+ hourly_rate: Money . t ( ) | nil ,
208
+ contract_type: Bounty . contract_type ( ) | nil
204
209
]
205
210
) ::
206
211
{ :ok , Bounty . t ( ) } | { :error , atom ( ) }
@@ -221,7 +226,8 @@ defmodule Algora.Bounties do
221
226
visibility: opts [ :visibility ] ,
222
227
shared_with: shared_with ,
223
228
hours_per_week: opts [ :hours_per_week ] ,
224
- hourly_rate: opts [ :hourly_rate ]
229
+ hourly_rate: opts [ :hourly_rate ] ,
230
+ contract_type: opts [ :contract_type ]
225
231
} ) ,
226
232
{ :ok , _job } <- notify_bounty ( % { owner: owner , bounty: bounty } ) do
227
233
broadcast ( )
0 commit comments