Fix for job urls that should have been within context of a service.

The service id path parameter is captured in the url prefix for the
job blueprint.
This commit is contained in:
Adam Shimali
2016-01-18 09:57:04 +00:00
parent 56f455fe3a
commit f4a0a9b8d9
5 changed files with 63 additions and 31 deletions
+3 -3
View File
@@ -7,13 +7,13 @@ def save_job(job):
db.session.commit()
def get_job_by_id(job_id):
return Job.query.filter_by(id=job_id).one()
def get_job(service_id, job_id):
return Job.query.filter_by(service_id=service_id, id=job_id).one()
def get_jobs_by_service(service_id):
return Job.query.filter_by(service_id=service_id).all()
def get_jobs():
def _get_jobs():
return Job.query.all()