export function getUpdateJobFunction(job, req) {
    return async (jobData)=>{
        const updatedJob = await req.payload.update({
            id: job.id,
            collection: 'payload-jobs',
            data: jobData,
            depth: 0,
            disableTransaction: true
        });
        // Update job object like this to modify the original object - that way, incoming changes (e.g. taskStatus field that will be re-generated through the hook) will be reflected in the calling function
        for(const key in updatedJob){
            job[key] = updatedJob[key];
        }
        return updatedJob;
    };
}

//# sourceMappingURL=getUpdateJobFunction.js.map