first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from fastapi import APIRouter, HTTPException, status
|
||||
|
||||
from app.models.jobs import JobResponse
|
||||
from app.services.jobs import get_job
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/{job_id}", response_model=JobResponse)
|
||||
def read(job_id: str) -> JobResponse:
|
||||
job = get_job(job_id)
|
||||
if job is None:
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Job not found")
|
||||
return job
|
||||
Reference in New Issue
Block a user