fix: simplify tags handling in recordings endpoint

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 <noreply@anthropic.com>
This commit is contained in:
Valknar XXX
2025-10-28 14:07:29 +01:00
parent 47016a2d5c
commit 9002eb768b

View File

@@ -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,