def post_email(request): email_body = request.POST.get('body') if not email_body: raise ParseError(detail='email_body not present in the POST data.') consume_email.apply_async((email_body, )) return Response(status=status.HTTP_201_CREATED)
def post_email(request): email_body = request.POST.get('body') if not email_body: raise ParseError( detail='email_body not present in the POST data.') consume_email.apply_async((email_body,)) return Response(status=status.HTTP_201_CREATED)