Exemplo n.º 1
0
def addPost():
    if not user.current_user():
        abort(403)

    url = request.form["url"]
    link.add(user.current_user(), url)

    if request.form.has_key("redirect"):
        return redirect(url)

    return redirect(url_for("index"))
Exemplo n.º 2
0
def link_push():
    url = request.form['url']
    link.add(user.current_user(), url)
    return jsonify(success=True)