mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-04 18:32:33 -05:00
List and individual job pages now fetch data from api.
Few bug fixes around job uuid.
This commit is contained in:
@@ -14,8 +14,13 @@ class JobApiClient(BaseAPIClient):
|
||||
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
|
||||
self.secret = app.config['ADMIN_CLIENT_SECRET']
|
||||
|
||||
def create_job(self, service_id, template_id, file_name):
|
||||
job_id = str(uuid.uuid4())
|
||||
def get_job(self, service_id, job_id=None):
|
||||
if job_id:
|
||||
return self.get(url='/service/{}/job/{}'.format(service_id, job_id))
|
||||
else:
|
||||
return self.get(url='/service/{}/job'.format(service_id))
|
||||
|
||||
def create_job(self, job_id, service_id, template_id, file_name):
|
||||
data = {
|
||||
"id": job_id,
|
||||
"service": service_id,
|
||||
|
||||
Reference in New Issue
Block a user