mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
REPP: custom success response handler
This commit is contained in:
parent
2e8ce7dbc4
commit
f6580bd79a
2 changed files with 38 additions and 54 deletions
|
@ -13,6 +13,13 @@ module Repp
|
|||
|
||||
private
|
||||
|
||||
def render_success(code: nil, message: nil, data: nil)
|
||||
resp = { code: code || 1000, message: message || 'Command completed successfully',
|
||||
data: data || {} }
|
||||
|
||||
render(json: resp, status: :ok)
|
||||
end
|
||||
|
||||
def epp_errors
|
||||
@errors ||= []
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue