fix: site enable check (#645)

pull/653/head
crazywoola 3 years ago committed by GitHub
parent 1d6829f400
commit f9412f5fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,6 +38,8 @@ def decode_jwt_token():
app_model = db.session.query(App).filter(App.id == decoded['app_id']).first()
if not app_model:
raise NotFound()
if app_model.enable_site is False:
raise Unauthorized('Site is disabled.')
end_user = db.session.query(EndUser).filter(EndUser.id == decoded['end_user_id']).first()
if not end_user:
raise NotFound()

Loading…
Cancel
Save