Add api support for updating payload by ID

master
Erin Bleiweiss 2018-09-18 16:03:21 -05:00
parent 9b5326994f
commit efe98dbcfb
No known key found for this signature in database
GPG Key ID: F69B2138BD594660
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,8 @@ module PayloadServlet
warden.authenticate!
begin
opts = parse_json_request(request, false)
tmp_params = sanitize_params(params)
opts[:id] = tmp_params[:id] if tmp_params[:id]
data = get_db.update_payload(opts)
set_json_data_response(response: data)
rescue => e