mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Improve keyrelay registrar
This commit is contained in:
parent
cdc93a570f
commit
b1714f4b1f
7 changed files with 25 additions and 26 deletions
|
@ -30,13 +30,17 @@ module Depp
|
|||
authInfo: {
|
||||
pw: { value: params['password'] }
|
||||
},
|
||||
expiry: {
|
||||
relative: { value: params['expiry_relative'] },
|
||||
absolute: { value: params['expiry_absolute'] }
|
||||
}
|
||||
expiry: expiry(params['expiry'])
|
||||
}, custom_params)
|
||||
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
def expiry(value)
|
||||
ISO8601::Duration.new(value)
|
||||
{ relative: { value: value } }
|
||||
rescue => _e
|
||||
{ absolute: { value: value } }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue