Skip to content

Commit

Permalink
preprod1
Browse files Browse the repository at this point in the history
  • Loading branch information
killua-eu committed Jan 16, 2024
1 parent 8a31b6b commit b035288
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion glued/Controllers/ServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,18 @@ public function objects_r1(Request $request, Response $response, array $args = [
o.name as name,
f.c_ext as ext,
o.ts_created as created,
-- om.data as meta,
CASE
WHEN om.data IS NULL OR JSON_LENGTH(om.data) = 0 THEN NULL
ELSE om.data
END AS meta,
fwd.refs,
back.backrefs
FROM `t_stor_objects` o
LEFT JOIN t_stor_files f ON f.c_hash = o.hash
LEFT JOIN v_stor_refs_fwd fwd ON fwd.object = o.object
LEFT JOIN v_stor_refs_back back ON back.object = o.object
LEFT JOIN t_stor_objects_meta om ON om.uuid = o.object
WHERE bucket = uuid_to_bin(? ,1) {$wm}
";

Expand All @@ -487,7 +493,7 @@ public function objects_r1(Request $request, Response $response, array $args = [
foreach ($r as &$rr) {
if (isset($rr['refs'])) { $rr['refs'] = json_decode($rr['refs']); }
if (isset($rr['backrefs'])) { $rr['backrefs'] = json_decode($rr['backrefs']); }
if (isset($rr['backrefs'])) { $rr['backrefs'] = json_decode($rr['backrefs']); }
if (isset($rr['meta'])) { $rr['meta'] = json_decode($rr['meta']); }
}
if ($wm !== '') { $r = $r[0]; }
if ($link) { $r['link'] = $link; }
Expand Down

0 comments on commit b035288

Please sign in to comment.