Add bbox PATCH endpoint + seed watermelon test bbox
- PATCH /api/objects/:id/pictures/:pictureId sets bounding box values - Migration seeds bbox for watermelon test object (x=0.08, y=0.10, w=0.78, h=0.76) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -485,6 +485,15 @@ async function migrate() {
|
||||
ON CONFLICT (short_en) DO UPDATE SET status = EXCLUDED.status, published_at = COALESCE(languages.published_at, EXCLUDED.published_at)
|
||||
`).catch(() => {});
|
||||
|
||||
// Seed bbox for watermelon test object (only if bbox_x is still NULL)
|
||||
await query(`
|
||||
UPDATE object_pictures
|
||||
SET bbox_x = 0.08, bbox_y = 0.10, bbox_w = 0.78, bbox_h = 0.76
|
||||
WHERE object_id = '67a609af-55c9-4560-ba63-c8ef93429ec0'
|
||||
AND picture_id = 'fa776286-1df1-4b47-a29c-fc6e83e6e2da'
|
||||
AND bbox_x IS NULL
|
||||
`).catch(() => {});
|
||||
|
||||
console.log('Migration complete');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user