Fixes auth-user-add.

authc
Luka Vandervelden 2020-09-26 14:27:47 +02:00
parent 0265383d05
commit 25361bf7aa
2 changed files with 3 additions and 3 deletions

View File

@ -448,7 +448,7 @@ module AuthD
def add_user(login : String, password : String,
email : String?,
phone : String?,
profile : JSON::Any?) : ::AuthD::User::Public | Exception
profile : Hash(String, JSON::Any)?) : ::AuthD::User::Public | Exception
send Request::AddUser.new @key, login, password, email, phone, profile
@ -513,7 +513,7 @@ module AuthD
password : String,
email : String?,
phone : String?,
profile : JSON::Any?) : ::AuthD::User::Public?
profile : Hash(String, JSON::Any)?) : ::AuthD::User::Public?
send Request::Register.new login, password, email, phone, profile
response = Response.from_ipc read

View File

@ -53,7 +53,7 @@ login = cli_login.not_nil! # not_nil!? O RLY?
profile = profile_file.try do |file|
begin
JSON.parse File.read file
JSON.parse(File.read file).as_h
rescue e
STDERR.puts e.message
exit 1