From 741d20aa70d0e1bae8c6b7363ddac6416af3aab2 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 1 Dec 2022 04:47:31 -0800 Subject: [PATCH] Send job and skills when party is updated --- app/views/api/v1/parties/update.json.rabl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/views/api/v1/parties/update.json.rabl b/app/views/api/v1/parties/update.json.rabl index fafd7e0..6cb851f 100644 --- a/app/views/api/v1/parties/update.json.rabl +++ b/app/views/api/v1/parties/update.json.rabl @@ -3,5 +3,18 @@ object @party attributes :id, :user_id, :shortcode node :is_extra do |p| - p.extra -end \ No newline at end of file + p.extra +end + +node :job do |p| + partial("jobs/base", object: p.job) +end + +node :job_skills do |p| + { + "0" => partial("job_skills/base", object: p.skill0), + "1" => partial("job_skills/base", object: p.skill1), + "2" => partial("job_skills/base", object: p.skill2), + "3" => partial("job_skills/base", object: p.skill3), + } +end