feat: vk_access_token в updateable fields
This commit is contained in:
@@ -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(', ');
|
||||
|
||||
Reference in New Issue
Block a user