summaryrefslogtreecommitdiff
path: root/src/web/_views/modal/new_post.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-04-03 11:25:57 -0400
committerFreya Murphy <freya@freyacat.org>2024-04-03 11:25:57 -0400
commit740df2706934231a91c5e2d5061198ea962c357c (patch)
treeb3de8027238850d43c6841f834a88e75ba90ce75 /src/web/_views/modal/new_post.php
parentfinish profile directory (mostly) (diff)
downloadxssbook2-740df2706934231a91c5e2d5061198ea962c357c.tar.gz
xssbook2-740df2706934231a91c5e2d5061198ea962c357c.tar.bz2
xssbook2-740df2706934231a91c5e2d5061198ea962c357c.zip
profile page
Diffstat (limited to 'src/web/_views/modal/new_post.php')
-rw-r--r--src/web/_views/modal/new_post.php12
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
});
});