import { DataSource } from 'typeorm'; import { MetaEntity } from '../../../entities'; export async function handleGetCurrentUserId(dataSource: DataSource): Promise { const metaRepo = dataSource.getRepository(MetaEntity); const metaRow = await metaRepo.findOne({ where: { key: 'currentUserId' } }); return metaRow?.value?.trim() || null; }