This repository has been archived on 2020-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
consumer-api/consumer_api/views/log_view.py
Fabian 60c6698495
All checks were successful
continuous-integration/drone/push Build is passing
comments added
2020-04-04 13:53:26 +02:00

13 lines
331 B
Python

from flask import request, current_app, Response
from flask_classful import FlaskView
class LogView(FlaskView):
def post(self):
# display received message
current_app.logger.info(f"New message: {request.json['message']}")
# return HTTP 204 - No content message
return Response(status = 204)