fix(xo-server/jobs): serialize all fields
Otherwise some strings containing valid JSON syntax are incorrectly transformed.
This commit is contained in:
parent
a1c829e393
commit
d51527b2d8
@ -90,10 +90,7 @@ const normalize = job => {
|
||||
|
||||
const serialize = (job: {| [string]: any |}) => {
|
||||
Object.keys(job).forEach(key => {
|
||||
const value = job[key]
|
||||
if (typeof value !== 'string') {
|
||||
job[key] = JSON.stringify(job[key])
|
||||
}
|
||||
job[key] = JSON.stringify(job[key])
|
||||
})
|
||||
return job
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user