feat: vk_access_token в updateable fields

This commit is contained in:
Ник (Claude)
2026-06-10 15:22:45 +03:00
parent be2735ea5e
commit b4c537487d
+2 -1
View File
@@ -115,7 +115,8 @@ async function updateChannel(channelId, userId, data) {
// обновить channels
if (Object.keys(channelFields).length) {
const fields = ['name', 'tg_channel_id', 'tg_username', 'bot_token',
'niche', 'audience', 'goal', 'language', 'region', 'is_active'];
'niche', 'audience', 'goal', 'language', 'region', 'is_active',
'vk_access_token'];
const updates = fields.filter(f => channelFields[f] !== undefined);
if (updates.length) {
const setClauses = updates.map((f, i) => `${f}=$${i + 1}`).join(', ');