From a58679c12f346ac7d299871c9380a4c18af1c319 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 24 Aug 2023 14:03:29 +1000 Subject: [PATCH] main: Simplified error message with mission key or domain --- master/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/master/main.py b/master/main.py index 975a0c8..404bb0f 100644 --- a/master/main.py +++ b/master/main.py @@ -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():