add started and viewed webhook events

This commit is contained in:
Alex Turchyn
2023-09-14 20:31:07 +03:00
parent 9d9e134bb4
commit 3faec9d174
9 changed files with 57 additions and 8 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
<div class="collapse-content" style="display: inherit">
<div class="mockup-code overflow-hidden relative">
<span class="top-0 right-0 absolute">
<%= render 'shared/clipboard_copy', icon: 'copy', text: code = JSON.pretty_generate({ event_type: 'form.submitted', timestamp: Time.current.iso8601, data: Submitters::SerializeForWebhook.call(submitter) }).gsub(/^/, ' ').sub(/^\s+/, ''), class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy', copied_title: 'Copied' %>
<%= render 'shared/clipboard_copy', icon: 'copy', text: code = JSON.pretty_generate({ event_type: 'form.completed', timestamp: Time.current.iso8601, data: Submitters::SerializeForWebhook.call(submitter) }).gsub(/^/, ' ').sub(/^\s+/, ''), class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy', copied_title: 'Copied' %>
</span>
<pre><code class="overflow-hidden w-full"><%= code %></code></pre>
</div>