def delete(parent_id, id): authz.require(authz.logged_in()) link = obj_or_404(Link.by_id(id, parent_id=parent_id)) db.session.delete(link) db.session.commit() raise Gone()
def update(parent_id, id): authz.require(authz.logged_in()) link = obj_or_404(Link.by_id(id, parent_id=parent_id)) link.save(request_data(), link.parent, g.user) db.session.commit() return jsonify(link)
def view(parent_id, id): authz.require(authz.logged_in()) link = obj_or_404(Link.by_id(id, parent_id=parent_id)) return jsonify(link)