Skip to content
Snippets Groups Projects
Commit 2faf6a54 authored by Andreas Valder's avatar Andreas Valder
Browse files

made moderator interface work ;/

parent e9b0ccb6
Branches
No related tags found
No related merge requests found
...@@ -245,7 +245,7 @@ def edit(): ...@@ -245,7 +245,7 @@ def edit():
'comment', 'internal']) 'comment', 'internal'])
} }
query('BEGIN TRANSACTION') query('BEGIN TRANSACTION')
if request.is_json(): if request.is_json:
changes = request.get_json().items() changes = request.get_json().items()
else: else:
changes = request.args.items() changes = request.args.items()
......
...@@ -47,8 +47,9 @@ var moderatorinterface = { ...@@ -47,8 +47,9 @@ var moderatorinterface = {
$.ajax({ $.ajax({
method: "POST", method: "POST",
url: "/edit", url: "/edit",
dataType: "text",
contentType: "application/json", contentType: "application/json",
data: req data: JSON.stringify(req)
}) })
.done(function( msg ) { .done(function( msg ) {
alert( "Data Saved: " + msg ); alert( "Data Saved: " + msg );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment