nudj / nudj-backend

Nudj - Backend (Archive)
0 stars 0 forks source link

Job bonus currency being returned as integer zero #23

Closed richardbuckle closed 8 years ago

richardbuckle commented 8 years ago

Steps to reproduce:

For an existing job ID, say 45, change the bonus_currency to USD: PUT https://api.nudj.co/api/v1/jobs/45 with HTTP body:

"{"title":"Test USD Bonus","active":"1","bonus_currency":"USD","company":"","description":"Job with bonus in USD","location":"","bonus":233,"skills":["Testing"],"salary":"TBA"}"

Then get the job: GET https://api.nudj.co/api/v1/jobs/45?params=job.title,job.company,job.liked,job.salary,job.active,job.description,job.skills,job.bonus,job.bonus_currency,job.user,job.location,user.image,user.name,user.contactapi/v1/jobs/45?params=job.title,job.company,job.liked,job.salary,job.active,job.description,job.skills,job.bonus,job.bonus_currency,job.user,job.location,user.image,user.name,user.contact

Expected: key bonus_currency in the returned JSON to be string "USD". Observed: bonus_currency in the returned JSON is integer 0 (zero).

shtukas commented 8 years ago

This should be corrected. Was caused by an incorrect casting.

richardbuckle commented 8 years ago

Verified