remove duplicate code from job_log_url endpoint