diff --git a/index.js b/index.js index ac8a022..ec2ccb9 100644 --- a/index.js +++ b/index.js @@ -254,6 +254,8 @@ router.post('/addComment', async ctx => { try { const body = ctx.request.body await comments.comments(ctx.session.user, body.comments, body.genretitle, body.genre) + ctx.body = "" + return; } catch (err) { console.log(err) @@ -264,7 +266,8 @@ router.post('/addComment', async ctx => { router.post('/deleteComment', async ctx => { try { await comments.deleteComments(ctx.request.body.commentID) - + ctx.body = "" + return; } catch (err) { console.log(err) await ctx.render('error', { message: err.message }) diff --git a/views/content_playlist.handlebars b/views/content_playlist.handlebars index da26a2d..9bfe00c 100644 --- a/views/content_playlist.handlebars +++ b/views/content_playlist.handlebars @@ -9,6 +9,10 @@ "comments": $("#comments").val(), "genre": $("#genre").val(), "genretitle": $("#genretitle").val(), + }, + complete: function(jqXHR, status) { + //console.log(status); + //console.log(JSON.stringify(jqXHR)); } }); load_content("content_playlist", "{{genre}}")