main: Simplified error message with mission key or domain
All checks were successful
Build Docker / Build Bot (push) Successful in 24s
Build Docker / Build Master (push) Successful in 26s

This commit is contained in:
Nathan Woodburn 2023-08-24 14:03:29 +10:00
parent fec6c64736
commit a58679c12f
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -34,8 +34,11 @@ def new_site():
api_key = request.headers.get('key')
# Verify both API key and domain exist
if api_key == None or domain == None:
return jsonify({'error': 'Invalid API key or domain', 'success': 'false'})
if api_key == None:
return jsonify({'error': 'Missing API key', 'success': 'false'})
if domain == None:
return jsonify({'error': 'Missing domain', 'success': 'false'})
# Check if API key is a valid site key
if api_key not in open('/data/licence_key.txt', 'r').read():