import { AUTH_STORAGE_KEY } from '../../apiConfig.js';

export function getSessionUserId() {
  try {
    const u = JSON.parse(localStorage.getItem(AUTH_STORAGE_KEY) || '{}').user;
    const id = u?.user_id;
    return id != null && id !== '' ? Number(id) : null;
  } catch {
    return null;
  }
}
