5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-05-17 23:20:49 +00:00

refactorizacion

This commit is contained in:
f 2022-04-19 10:57:01 -03:00
parent 13561a5f71
commit 52f446fcf1

View file

@ -14,9 +14,9 @@ module Api
#
# TODO: Aplicar rate_limit
def create
csp = CspReport.new(csp_report_params.to_h.map do |k, v|
[k.tr('-', '_'), v]
end.to_h)
csp = CspReport.new(csp_report_params.to_h.transform_keys do |k|
k.tr('-', '_')
end)
csp.id = SecureRandom.uuid
csp.save