Remove trailing newlines introduced from new/edit page for http functions

This commit is contained in:
Peter Stockings
2023-12-17 11:06:42 +11:00
parent 204000a668
commit 538d5083e4
2 changed files with 4 additions and 6 deletions

View File

@@ -34,8 +34,7 @@
</div>
<div id="editor" class="relative rounded-lg shadow-lg p-4 mb-4">{{ script }}
</div>
<div id="editor" class="relative rounded-lg shadow-lg p-4 mb-4">{{ script }}</div>
<div class="flex">
<button
@@ -154,7 +153,7 @@
document.querySelector('#add-http-function').addEventListener('click', () => {
let name = '{{ name }}';
let script_content = editor.getValue();
let script_content = editor.getValue().trim();
fetch("{{ url_for('edit_http_function') }}", {
method: 'POST',

View File

@@ -37,8 +37,7 @@
</div>
<div id="editor" class="relative rounded-lg shadow-lg p-4 mb-4">{{ script }}
</div>
<div id="editor" class="relative rounded-lg shadow-lg p-4 mb-4">{{ script }}</div>
<button
class="bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded flex"
@@ -141,7 +140,7 @@
document.querySelector('#add-http-function').addEventListener('click', () => {
let name = document.querySelector('#function-name').value;
let script_content = editor.getValue();
let script_content = editor.getValue().trim();
fetch("{{ url_for('create_http_function') }}", {
method: 'POST',