From 9002eb768ba8d8adccaad2c36f6c010f6f9fafd8 Mon Sep 17 00:00:00 2001 From: Valknar XXX Date: Tue, 28 Oct 2025 14:07:29 +0100 Subject: [PATCH] fix: simplify tags handling in recordings endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed complex JSON parsing logic for tags field. Now that sexy_recordings.tags is a json column type (matching sexy_videos), Directus/Knex handles the conversion automatically. Simple `tags || []` is sufficient. Related to gamification implementation where sexy_recordings.tags was changed from text[] to json type to match videos table implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- packages/bundle/src/endpoint/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bundle/src/endpoint/index.ts b/packages/bundle/src/endpoint/index.ts index d5014ae..3178309 100644 --- a/packages/bundle/src/endpoint/index.ts +++ b/packages/bundle/src/endpoint/index.ts @@ -344,7 +344,7 @@ export default { duration, events, device_info, - tags: Array.isArray(tags) ? tags : (typeof tags === 'string' ? (tags.startsWith('[') ? JSON.parse(tags) : []) : []), + tags: tags || [], linked_video: linked_video || null, status: status || "draft", public: false,