Commit 2fb27c0c by Luciano Barletta

fixed bug when redirecting to login and back to a form

1 parent a03c9de5
......@@ -27,6 +27,7 @@ def main():
@app.route('/load/<name>', methods = ['POST'])
def load(name):
import ipdb; ipdb.set_trace()
try:
data = request.json
......
......@@ -45,6 +45,6 @@ function validate(url){
function redirect(url){
cookie = new CookieHandler;
if (cookie.get("login") == "") window.location.href = "/login";
if (cookie.get("login") == "") window.location.href = url + "/-";
else window.location.href = url + "/" + cookie.get("login");
}
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!