added getter
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2021-12-13 01:42:49 +01:00
parent 67403c6f63
commit c06a2aa110

View File

@ -88,3 +88,13 @@ class AssignmentView(FlaskView):
# Asking myself... # Asking myself...
return jsonify(resp) return jsonify(resp)
def get(self):
current_scheduling_table = {}
for key in redis_client.keys("SCHEDULED:*"):
target = redis_client.get(key)
if target:
name = key[10:]
current_scheduling_table[name] = target
return jsonify(current_scheduling_table)