diff options
Diffstat (limited to '')
-rw-r--r-- | src/web/_views/modal/new_post.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/web/_views/modal/new_post.php b/src/web/_views/modal/new_post.php index 50b9b84..66cb8c8 100644 --- a/src/web/_views/modal/new_post.php +++ b/src/web/_views/modal/new_post.php @@ -31,18 +31,18 @@ <script> $('#new-post-form').submit(function(e) { e.preventDefault(); - let content = $('#new-post-content').val(); - let me = $(this); + var content = $('#new-post-content').val(); + var me = $(this); - const getPost = function(data) { + var getPost = function(data) { if (data) { $('#post-container').prepend(data); } me.closest('.modal-container').remove(); } - const onPost = function(data) { - let id = data[0].id; + var onPost = function(data) { + var id = data[0].id; $.get({ url: '/_util/post/post?id=' + id, success: getPost @@ -52,7 +52,7 @@ $.ajax({ url: '/api/post', method: 'POST', - data: JSON.stringify({ content }), + data: JSON.stringify({ content: content }), success: onPost }); }); |