Skip to content

Commit

Permalink
add allow_warn_status parameter to fs submission call (#467)
Browse files Browse the repository at this point in the history
* add allow_warn_status parameter to fs submission call

* default to true
  • Loading branch information
celuchmarek authored Aug 21, 2024
1 parent 90cafb2 commit 5a573ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/jobs/fs/submit_message_draft_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ def perform(message_draft, bulk_submit: false, fs_client: FsEnvironment.fs_clien
response = fs_api.post_submission(
message_draft.form.identifier,
Base64.strict_encode64(message_draft.form_object.content),
message_draft.form_object.is_signed,
message_draft.form_object.mimetype
allow_warn_status: true,
is_signed: message_draft.form_object.is_signed,
mime_type: message_draft.form_object.mimetype
)

message_draft.thread.box.message_submission_requests.create(
Expand Down
5 changes: 3 additions & 2 deletions app/lib/fs/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ def delete_validation(validation_id)
request(:delete, "validations/#{validation_id}", {}, jwt_header, accept_negative: true)
end

def post_submission(form_identifier, content, is_signed = true, mime_type = 'application/vnd.etsi.asic-e+zip', obo: @obo)
def post_submission(form_identifier, content, allow_warn_status: true, is_signed: true, mime_type: 'application/vnd.etsi.asic-e+zip', obo: @obo)
request(:post, "submissions", {
is_signed: is_signed,
mime_type: mime_type,
form_identifier: form_identifier,
content: content
content: content,
allow_warn_status: allow_warn_status
}, jwt_header(obo).merge(fs_credentials_header))
end

Expand Down

0 comments on commit 5a573ea

Please sign in to comment.