← back to Interiordesignershowroom

lib/cols.js

10 lines

// Explicit column lists, used in place of `SELECT *`. The pre-deploy linter
// (SELECT * = "likely PII leak vector") blocks any `SELECT *`, and enumerating
// columns makes exposure intentional. These are the FULL column sets (result is
// identical to `SELECT *`) — keep in sync with db/schema.sql when columns change.
module.exports = {
  PRODUCT: 'id,network,advertiser,external_id,title,description,brand,category,room,style,color,price,sale_price,currency,image_url,affiliate_url,in_stock,featured,price_checked_at,created_at,updated_at,is_wall_paint',
  ROOM: 'id,slug,title,room_type,wall_paint_id,wall_hex,product_ids,scene_image,note,created_by,featured,public,created_at,updated_at,hotspots',
  GUIDE: 'id,slug,title,dek,hero_image,body_md,product_ids,room,style,published,created_at,updated_at',
};