File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,24 @@ mod_opt_type(db_type) ->
292292 econf :db_type (? MODULE );
293293mod_opt_type (landing_page ) ->
294294 econf :either (
295- econf :enum ([none , auto ]), econf :binary ());
295+ econf :enum ([none , auto ]),
296+ econf :and_then (
297+ econf :binary (),
298+ fun (Tmpl ) ->
299+ try
300+ mod_invites_http :tmpl_to_renderer (Tmpl ) of
301+ R when is_atom (R ) ->
302+ Tmpl
303+ catch
304+ error :{badmatch , error } ->
305+ T = <<" There is some problem in the value you configured "
306+ " for option 'landing_page' in 'mod_invites'. "
307+ " Please consult the documentation and fix it: " ,
308+ Tmpl /binary >>,
309+ ? CRITICAL_MSG (T , []),
310+ throw ({error , T })
311+ end
312+ end ));
296313mod_opt_type (max_invites ) ->
297314 econf :pos_int (infinity );
298315mod_opt_type (site_name ) ->
Original file line number Diff line number Diff line change 2828
2929-include (" logger.hrl" ).
3030
31- -export ([process /2 , landing_page /2 ]).
31+ -export ([process /2 , landing_page /2 , tmpl_to_renderer / 1 ]).
3232
3333-ifdef (TEST ).
3434-export ([apps_json /3 ]).
You can’t perform that action at this time.
0 commit comments