Files
api/src/program-settings/runtime-setting-keys.ts
T
mohmdsdgandCursor b3112cf032 fix(plugins): per-tenant plugin store flag and harden broken schema APIs
Store enablement is now a tenant settings row instead of a global runtime switch, and expiring/requests endpoints degrade to empty lists when store tables are missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 19:51:11 +03:30

24 lines
733 B
TypeScript

/** کلیدهای runtime / لاگ — مال سوپرادمین نیستند؛ در اپ خانگی توسط cron پر می‌شوند. */
export const PLUGIN_STORE_SETTING_KEY = 'plugin_store_enabled';
export const RUNTIME_PROGRAM_SETTING_KEYS = new Set([
'montzar_last_product_log',
'montzar_order_response',
'montzar_live_price',
'montzar_mazaneh',
'montzar_diff',
'montzar_truly_buy_mazaneh',
'montzar_truly_sell_mazaneh',
'montzar_token',
'montzar_closed',
'up_price',
'down_price',
'price_extreme_date',
'do_send_liman',
PLUGIN_STORE_SETTING_KEY,
]);
export function isRuntimeProgramSettingKey(keyRaw: string): boolean {
return RUNTIME_PROGRAM_SETTING_KEYS.has(String(keyRaw || '').trim());
}