-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Hi,
I installed the ejabberd 15.09 via the osx installer and installed the mod_restful module via ejabberdctl module_install.
Warnings on module_install:
src/mod_restful_admin.erl:63: Warning: behaviour gen_restful_api undefined
src/mod_restful_register.erl:32: Warning: behaviour gen_restful_api undefined
Here's my yml:
mod_restful:
api:
- path: ["admin"]
module: mod_restful_admin
params:
key: "secret"
allowed_commands: [register, unregister]
- path: ["register"]
module: mod_restful_register
params:
key: "secret"
Warning on ejabberd start up:
2015-10-05 13:02:30.594 [warning] <0.37.0>@gen_mod:validate_opts:255 module 'mod_restful' doesn't export mod_opt_type/1
Here's the error I got:
2015-10-05 13:24:30.118 [debug] <0.470.0>@ejabberd_http:process_header:283 (#Port<0.4074>) http query: 'GET' <<"/api/register/is_registered?username=admin&host=chat.myhost.com&key=secret">>
2015-10-05 13:24:30.118 [debug] <0.470.0>@ejabberd_http:process:361 [<<"api">>,<<"register">>,<<"is_registered">>] matches [<<"api">>]
2015-10-05 13:24:30.119 [error] <0.470.0> Processing throwed error {badmatch,false}
trace: [{mod_restful,handle_request,3,[{file,"src/mod_restful.erl"},{line,179}]},{mod_restful,process,2,[{file,"src/mod_restful.erl"},{line,161}]},{ejabberd_http,process,5,[{file,"src/ejabberd_http.erl"},{line,371}]},{ejabberd_http,process_request,1,[{file,"src/ejabberd_http.erl"},{line,459}]},{ejabberd_http,process_header,2,[{file,"src/ejabberd_http.erl"},{line,293}]},{ejabberd_http,parse_headers,1,[{file,"src/ejabberd_http.erl"},{line,209}]},{ejabberd_http,init,2,[{file,"src/ejabberd_http.erl"},{line,163}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]
I'm pretty new at ejabberd, so any help is appreciated.