Default service limit reduced to 50

This commit is contained in:
Martyn Inglis
2016-03-09 14:22:35 +00:00
parent 614e454186
commit 8a4e8bd3f6
2 changed files with 4 additions and 4 deletions

View File

@@ -1,14 +1,12 @@
from flask import url_for, abort from flask import url_for, abort, current_app
from app import notifications_api_client from app import notifications_api_client
from app.utils import BrowsableItem from app.utils import BrowsableItem
from notifications_python_client.errors import HTTPError from notifications_python_client.errors import HTTPError
def insert_new_service(service_name, user_id): def insert_new_service(service_name, user_id):
# Add a service with default attributes
# Should we try and handle exception here
resp = notifications_api_client.create_service( resp = notifications_api_client.create_service(
service_name, False, 1000, True, user_id) service_name, False, current_app.config['DEFAULT_SERVICE_LIMIT'], True, user_id)
return resp['data']['id'] return resp['data']['id']

View File

@@ -44,6 +44,8 @@ class Config(object):
DANGEROUS_SALT = 'itsdangeroussalt' DANGEROUS_SALT = 'itsdangeroussalt'
TOKEN_MAX_AGE_SECONDS = 3600 TOKEN_MAX_AGE_SECONDS = 3600
DEFAULT_SERVICE_LIMIT = 50
MAX_CONTENT_LENGTH = 10 * 1024 * 1024 # 10mb MAX_CONTENT_LENGTH = 10 * 1024 * 1024 # 10mb
UPLOAD_FOLDER = '/tmp' UPLOAD_FOLDER = '/tmp'