Compare commits
	
		
			8 Commits
		
	
	
		
			dev-sync
			...
			dev-fabian
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f8feb40723 | |||
| 0c18cf9bf1 | |||
| 68e2eaffcb | |||
| 3c8229238c | |||
| 0c3161ef03 | |||
| 244b779107 | |||
| b04d0d60d0 | |||
| 735aba20df | 
@@ -1,7 +1,12 @@
 | 
			
		||||
import json
 | 
			
		||||
 | 
			
		||||
from db import redis_client
 | 
			
		||||
from flask import jsonify
 | 
			
		||||
from flask_classful import FlaskView
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ConsumersView(FlaskView):
 | 
			
		||||
 | 
			
		||||
    def get(self):
 | 
			
		||||
        return "ConsumersView"
 | 
			
		||||
        consumer_list = json.loads((redis_client.get("consumer_list") or b"{}").decode('utf-8'))
 | 
			
		||||
        return jsonify([v['ip'] for k, v in consumer_list.items()])
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,9 @@
 | 
			
		||||
from flask import request, current_app, Response
 | 
			
		||||
from flask_classful import FlaskView
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class LogView(FlaskView):
 | 
			
		||||
 | 
			
		||||
    def get(self):
 | 
			
		||||
        return "LogView"
 | 
			
		||||
    def post(self):
 | 
			
		||||
        current_app.logger.info(f"New message: {request.json['message']}")
 | 
			
		||||
        return Response(status = 204)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user