def unsubscribe(): if not env.owner or not env.owner.id: raise NotFound users.unsubscribe(env.owner) if env.request.is_xhr: return Response(json.dumps({"ok": True}), mimetype="application/json") return Response(redirect=env.request.referer)
def unsubscribe(login): users.unsubscribe(login)