fix: parse tags JSON string in recording creation

Handle tags field when sent as JSON string by parsing it into
an array before insertion. Fixes "malformed array literal" error
when saving recordings with tags.

🤖 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 13:44:35 +01:00
parent 6b3d770182
commit 47016a2d5c

View File

@@ -344,7 +344,7 @@ export default {
duration,
events,
device_info,
tags: tags || [],
tags: Array.isArray(tags) ? tags : (typeof tags === 'string' ? (tags.startsWith('[') ? JSON.parse(tags) : []) : []),
linked_video: linked_video || null,
status: status || "draft",
public: false,