Fixes auth-user-add.
parent
0265383d05
commit
25361bf7aa
|
@ -448,7 +448,7 @@ module AuthD
|
||||||
def add_user(login : String, password : String,
|
def add_user(login : String, password : String,
|
||||||
email : String?,
|
email : String?,
|
||||||
phone : 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
|
send Request::AddUser.new @key, login, password, email, phone, profile
|
||||||
|
|
||||||
|
@ -513,7 +513,7 @@ module AuthD
|
||||||
password : String,
|
password : String,
|
||||||
email : String?,
|
email : String?,
|
||||||
phone : 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
|
send Request::Register.new login, password, email, phone, profile
|
||||||
response = Response.from_ipc read
|
response = Response.from_ipc read
|
||||||
|
|
|
@ -53,7 +53,7 @@ login = cli_login.not_nil! # not_nil!? O RLY?
|
||||||
|
|
||||||
profile = profile_file.try do |file|
|
profile = profile_file.try do |file|
|
||||||
begin
|
begin
|
||||||
JSON.parse File.read file
|
JSON.parse(File.read file).as_h
|
||||||
rescue e
|
rescue e
|
||||||
STDERR.puts e.message
|
STDERR.puts e.message
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue