@@ -53,7 +53,8 @@ defmodule Algora.Bounties do
5353 visibility: Bounty . visibility ( ) ,
5454 shared_with: [ String . t ( ) ] ,
5555 hours_per_week: integer ( ) | nil ,
56- hourly_rate: Money . t ( ) | nil
56+ hourly_rate: Money . t ( ) | nil ,
57+ contract_type: Bounty . contract_type ( ) | nil
5758 } ) ::
5859 { :ok , Bounty . t ( ) } | { :error , atom ( ) }
5960 defp do_create_bounty ( % { creator: creator , owner: owner , amount: amount , ticket: ticket } = params ) do
@@ -66,7 +67,8 @@ defmodule Algora.Bounties do
6667 visibility: params [ :visibility ] || owner . bounty_mode ,
6768 shared_with: params [ :shared_with ] || [ ] ,
6869 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 ]
7072 } )
7173
7274 changeset
@@ -115,7 +117,8 @@ defmodule Algora.Bounties do
115117 visibility: Bounty . visibility ( ) | nil ,
116118 shared_with: [ String . t ( ) ] | nil ,
117119 hourly_rate: Money . t ( ) | nil ,
118- hours_per_week: integer ( ) | nil
120+ hours_per_week: integer ( ) | nil ,
121+ contract_type: Bounty . contract_type ( ) | nil
119122 ]
120123 ) ::
121124 { :ok , Bounty . t ( ) } | { :error , atom ( ) }
@@ -148,7 +151,8 @@ defmodule Algora.Bounties do
148151 visibility: opts [ :visibility ] ,
149152 shared_with: shared_with ,
150153 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 ]
152156 } )
153157
154158 :set ->
@@ -200,7 +204,8 @@ defmodule Algora.Bounties do
200204 visibility: Bounty . visibility ( ) | nil ,
201205 shared_with: [ String . t ( ) ] | nil ,
202206 hours_per_week: integer ( ) | nil ,
203- hourly_rate: Money . t ( ) | nil
207+ hourly_rate: Money . t ( ) | nil ,
208+ contract_type: Bounty . contract_type ( ) | nil
204209 ]
205210 ) ::
206211 { :ok , Bounty . t ( ) } | { :error , atom ( ) }
@@ -221,7 +226,8 @@ defmodule Algora.Bounties do
221226 visibility: opts [ :visibility ] ,
222227 shared_with: shared_with ,
223228 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 ]
225231 } ) ,
226232 { :ok , _job } <- notify_bounty ( % { owner: owner , bounty: bounty } ) do
227233 broadcast ( )
0 commit comments