diff --git a/litecord/blueprints/auth.py b/litecord/blueprints/auth.py index 454c4bb..8936c4c 100644 --- a/litecord/blueprints/auth.py +++ b/litecord/blueprints/auth.py @@ -31,6 +31,10 @@ def make_token(user_id, user_pwd_hash) -> str: @bp.route('/register', methods=['POST']) async def register(): """Register a single user.""" + enabled = app.config.get('REGISTRATIONS') + if not enabled: + return 'Registrations disabled', 405 + j = await request.get_json() email, password, username = j['email'], j['password'], j['username'] diff --git a/litecord/blueprints/user/billing_job.py b/litecord/blueprints/user/billing_job.py index ff6f0d0..d33b181 100644 --- a/litecord/blueprints/user/billing_job.py +++ b/litecord/blueprints/user/billing_job.py @@ -97,4 +97,5 @@ async def payment_job(app): except Exception: log.exception('error while processing user payments') + log.debug('rescheduling..') await _resched(app)