Changeset abdcf33 in Klonkt for src/routes


Ignore:
Timestamp:
06/27/2026 09:46:03 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
d2b7247
Parents:
3746f6a
Message:

chore(cleanup): remove the dead comments_moderation_mode column + handling

Native comments are gone; this column was set but never read. Removed from the site
INSERT (admin-sites create) and UPDATE (save) in lockstep (column + placeholder + value),
from ensurePrimarySite's seed INSERT, the ensureColumn in database.js, and the 3 unused
i18n keys (asite.comment_moderation / moderation_trust / moderation_moderate, x3 langs).
No DROP — the column stays in existing DBs as harmless dead data. require_login_to_comment
is kept (still used by PermissionsService).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/admin-sites.js

    r3746f6a rabdcf33  
    222222      language, palette, accent, profile_photo,
    223223      is_public, robots_index, require_login_to_comment, enable_audio_player,
    224       feed_view_default, comments_moderation_mode
    225     ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
     224      feed_view_default
     225    ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    226226  `).run(
    227227    siteId, slug,
     
    239239    (f.enable_audio_player !== undefined ? (f.enable_audio_player ? 1 : 0) : 1),
    240240    f.feed_view_default === 'timeline' ? 'timeline' : 'grid',
    241     f.comments_moderation_mode === 'trust' ? 'trust' : 'moderate',
    242241  );
    243242
     
    280279
    281280  const f = req.body;
    282   const moderationMode = f.comments_moderation_mode === 'moderate' ? 'moderate' : 'trust';
    283281  const feedViewDef = f.feed_view_default === 'grid' ? 'grid' : 'timeline';
    284282  const profileLinksJson = buildProfileLinks(f);
     
    300298      is_public = ?, robots_index = ?, require_login_to_comment = ?,
    301299      enable_audio_player = ?,
    302       comments_moderation_mode = ?,
    303300      feed_view_default = ?, feed_view_switch = ?,
    304301      show_search = ?, show_archive_link = ?,
     
    321318    f.require_login_to_comment ? 1 : 0,
    322319    f.enable_audio_player ? 1 : 0,
    323     moderationMode,
    324320    feedViewDef,
    325321    f.feed_view_switch ? 1 : 0,
Note: See TracChangeset for help on using the changeset viewer.