mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Refactor request_valid
This commit is contained in:
parent
0b7017481d
commit
e66b5adae5
3 changed files with 14 additions and 12 deletions
|
@ -15,7 +15,8 @@ class Epp::KeyrelaysController < EppController
|
|||
|
||||
def validate_keyrelay
|
||||
@prefix = 'keyrelay >'
|
||||
epp_request_valid?(
|
||||
|
||||
requires(
|
||||
'name',
|
||||
'keyData', 'keyData > pubKey', 'keyData > flags', 'keyData > protocol', 'keyData > alg',
|
||||
'authInfo', 'authInfo > pw'
|
||||
|
@ -23,6 +24,7 @@ class Epp::KeyrelaysController < EppController
|
|||
|
||||
optional 'expiry > relative', duration_iso8601: true
|
||||
optional 'expiry > absolute', date_time_iso8601: true
|
||||
|
||||
exactly_one_of 'expiry > relative', 'expiry > absolute'
|
||||
end
|
||||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue