// Fixture: gateway/middleware.ts — request middleware
import { log } from '../utils/logger';
import { SessionEntry } from './types';

export function applyMiddleware(session: SessionEntry): void {
  log('applying middleware for ' + session.key);
  validateSession(session);
}

function validateSession(session: SessionEntry): boolean {
  return session.key.length > 0;
}
