mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-29 07:21:27 +00:00
feat(jobs): return type_id of the job in graphql api
This commit is contained in:
parent
e4865aa094
commit
11184a55e8
|
@ -12,6 +12,7 @@ class ApiJob:
|
||||||
"""Job type for GraphQL."""
|
"""Job type for GraphQL."""
|
||||||
|
|
||||||
uid: str
|
uid: str
|
||||||
|
type_id: str
|
||||||
name: str
|
name: str
|
||||||
description: str
|
description: str
|
||||||
status: str
|
status: str
|
||||||
|
@ -28,6 +29,7 @@ def job_to_api_job(job: Job) -> ApiJob:
|
||||||
"""Convert a Job from jobs controller to a GraphQL ApiJob."""
|
"""Convert a Job from jobs controller to a GraphQL ApiJob."""
|
||||||
return ApiJob(
|
return ApiJob(
|
||||||
uid=str(job.uid),
|
uid=str(job.uid),
|
||||||
|
type_id=job.type_id,
|
||||||
name=job.name,
|
name=job.name,
|
||||||
description=job.description,
|
description=job.description,
|
||||||
status=job.status.name,
|
status=job.status.name,
|
||||||
|
|
Loading…
Reference in a new issue