def editPoll(payload, req): uid = UR.getUserId(req) if uid is None or ("id_poll" not in payload) or not annotations.canEditPoll( uid, payload["id_poll"]): return UR.prepare_response({}, 1, "NOT ALLOWED") annotations.editPoll(uid, payload) return UR.prepare_response({})
def editPoll(payload, req): uid = UR.getUserId(req) if uid is None or ("id_poll" not in payload) or not annotations.canEditPoll(uid, payload["id_poll"]): return UR.prepare_response({}, 1, "NOT ALLOWED") annotations.editPoll(uid, payload) return UR.prepare_response({})