fix(cleanup): TODO-010 — replace hardcoded PRODUCT_ID with import from product-config
This commit is contained in:
parent
8152d508d1
commit
d74c80a711
@ -30,10 +30,7 @@ import {
|
||||
type HouseholdInvite,
|
||||
} from './types.js';
|
||||
|
||||
// TODO-010: Import PRODUCT_ID from product-config instead of hardcoding
|
||||
// Priority: low | Phase: cleanup
|
||||
// Replace this line with: import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
const PRODUCT_ID = 'chronomind';
|
||||
import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
|
||||
function isAdmin(household: HouseholdDoc, userId: string): boolean {
|
||||
return household.members.some(m => m.userId === userId && m.role === 'admin');
|
||||
|
||||
@ -24,10 +24,7 @@ import {
|
||||
type RoutineDoc,
|
||||
} from './types.js';
|
||||
|
||||
// TODO-010: Import PRODUCT_ID from product-config instead of hardcoding
|
||||
// Priority: low | Phase: cleanup
|
||||
// Replace this line with: import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
const PRODUCT_ID = 'chronomind';
|
||||
import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
|
||||
export async function routineRoutes(app: FastifyInstance) {
|
||||
// Sync — must be before :id param route
|
||||
|
||||
@ -25,10 +25,7 @@ import {
|
||||
type SharedTimerDoc,
|
||||
} from './types.js';
|
||||
|
||||
// TODO-010: Import PRODUCT_ID from product-config instead of hardcoding
|
||||
// Priority: low | Phase: cleanup
|
||||
// Replace this line with: import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
const PRODUCT_ID = 'chronomind';
|
||||
import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
|
||||
async function requireMembership(householdId: string, userId: string) {
|
||||
const household = await getHousehold(householdId);
|
||||
|
||||
@ -28,11 +28,7 @@ import {
|
||||
type FreeSlot,
|
||||
} from './types.js';
|
||||
|
||||
// TODO-010: Import PRODUCT_ID from product-config instead of hardcoding
|
||||
// Priority: low | Phase: cleanup
|
||||
// Replace this line with: import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
// Same fix needed in: routines/routes.ts, households/routes.ts, webhooks/routes.ts, shared-timers/routes.ts
|
||||
const PRODUCT_ID = 'chronomind';
|
||||
import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
|
||||
export async function timerRoutes(app: FastifyInstance) {
|
||||
// Sync — must be before :id param route
|
||||
|
||||
@ -10,10 +10,7 @@ import { dispatchEvent } from './dispatcher.js';
|
||||
import { extractAuth } from '../../lib/auth.js';
|
||||
import { BadRequestError } from '@bytelyst/errors';
|
||||
|
||||
// TODO-010: Import PRODUCT_ID from product-config instead of hardcoding
|
||||
// Priority: low | Phase: cleanup
|
||||
// Replace this line with: import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
const PRODUCT_ID = 'chronomind';
|
||||
import { PRODUCT_ID } from '../../lib/product-config.js';
|
||||
|
||||
export async function webhookRoutes(app: FastifyInstance) {
|
||||
// Event types — must be before :id param route
|
||||
|
||||
Loading…
Reference in New Issue
Block a user