parent
9c01f8281c
commit
2da7fa4241
|
@ -155,9 +155,6 @@ def analyze_data(num_numbers, bits_per_number, startup):
|
|||
return json.dumps(data)
|
||||
|
||||
else:
|
||||
os.unlink(filename)
|
||||
os.unlink(binary_filename)
|
||||
os.unlink(hex_filename)
|
||||
return 400
|
||||
|
||||
# Teste den Code
|
||||
|
|
|
@ -40,10 +40,10 @@ def get_random_numbers():
|
|||
bits = request.args.get('numBits')
|
||||
|
||||
if not quantity.isdigit() or not bits.isdigit():
|
||||
return create_response(400, 'Invalid input. Quantity and bits must be numeric.')
|
||||
return create_response(400, 'Invalid input. Quantity and bits must be numeric')
|
||||
|
||||
if int(quantity) <= 0 or int(bits) <= 0:
|
||||
return create_response(400, 'Invalid input. Quantity and bits must be positive integers.')
|
||||
return create_response(400, 'Invalid input. Quantity and bits must be positive integers')
|
||||
|
||||
if not initialized:
|
||||
return create_response(432, 'System not ready; try init')
|
||||
|
|
|
@ -135,6 +135,9 @@ document.getElementById('generateButton').addEventListener('click', function(eve
|
|||
|
||||
resultDiv.insertBefore(copyAllButton, table); // Füge den "Copy all" Button vor der Tabelle ein
|
||||
} else {
|
||||
document.getElementById('status').innerText = 'Status: ' + data.status;
|
||||
document.getElementById('description').innerText = data.description;
|
||||
|
||||
var errorParagraph = document.createElement('p');
|
||||
errorParagraph.textContent = 'Error: ' + data.message;
|
||||
resultDiv.appendChild(errorParagraph);
|
||||
|
|
Loading…
Reference in New Issue