mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-11-14 00:43:50 +00:00
clear without swap endpoint
This commit is contained in:
parent
d715b0a01b
commit
1e618efed0
13
API/main.py
13
API/main.py
@ -99,6 +99,19 @@ def set_color():
|
|||||||
|
|
||||||
return jsonify(response)
|
return jsonify(response)
|
||||||
|
|
||||||
|
@api.route('/clear', methods=['GET'])
|
||||||
|
def update_matrix():
|
||||||
|
response = { 'success': True }
|
||||||
|
|
||||||
|
try:
|
||||||
|
global matrix
|
||||||
|
matrix.clear()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
response['success'] = False
|
||||||
|
|
||||||
|
return jsonify(response)
|
||||||
|
|
||||||
@api.route('/update', methods=['GET'])
|
@api.route('/update', methods=['GET'])
|
||||||
def update_matrix():
|
def update_matrix():
|
||||||
response = { 'success': True }
|
response = { 'success': True }
|
||||||
|
Loading…
Reference in New Issue
Block a user