@@ 114-121 (lines=8) @@ | ||
111 | $part_id = R::store($part); |
|
112 | ||
113 | //add the badge to the project |
|
114 | foreach ($data['badges'] as $badge_id) { |
|
115 | //TODO insert those badge as first hidden post |
|
116 | $pb = R::dispense("partbadge"); |
|
117 | $pb->badge = $badge_id; |
|
118 | $pb->part = $part_id; |
|
119 | $pb->inserttime = date('Y-m-d H:i:s'); |
|
120 | $tmp = R::store($pb); |
|
121 | } |
|
122 | ||
123 | //add the workspace created to the user as owner |
|
124 | $usw = R::dispense("userworkspace"); |
|
@@ 308-314 (lines=7) @@ | ||
305 | $resource_id = R::store($resource); |
|
306 | } |
|
307 | ||
308 | foreach($data['badges'] as $badge_id){ //TODO va fixato nelle api |
|
309 | $pb = R::dispense("partbadge"); |
|
310 | $pb->badge = $badge_id; |
|
311 | $pb->part = $part_id; |
|
312 | $pb->inserttime = date('Y-m-d H:i:s'); |
|
313 | $tmp = R::store($pb); |
|
314 | } |
|
315 | ||
316 | $res = ["id"=>$part_id]; |
|
317 | $headers = []; |