Removed old endpoint.

Going to handle the migration in the clients.
This commit is contained in:
Martyn Inglis
2016-08-18 14:06:12 +01:00
parent 7a5acea71b
commit ede7d0cbea
2 changed files with 6 additions and 147 deletions

View File

@@ -22,22 +22,6 @@ register_errors(template_statistics)
@template_statistics.route('')
def get_template_statistics_for_service(service_id):
if request.args.get('limit_days'):
try:
limit_days = int(request.args['limit_days'])
except ValueError as e:
error = '{} is not an integer'.format(request.args['limit_days'])
message = {'limit_days': [error]}
raise InvalidRequest(message, status_code=400)
else:
limit_days = None
stats = dao_get_template_statistics_for_service(service_id, limit_days=limit_days)
data = template_statistics_schema.dump(stats, many=True).data
return jsonify(data=data)
@template_statistics.route('/replacement')
def get_template_statistics_for_service_by_day(service_id):
if request.args.get('limit_days'):
try: