/**
 * Turn a stored, ASSET_BASE_URL-relative media path into the absolute URL the
 * gallery/admin responses carry (PLANNING.md §1). Shared by the public gallery
 * service and the admin media service so the two never drift.
 */
import { env } from '../../env';

export function assetUrl(relPath: string): string {
  return `${env.ASSET_BASE_URL.replace(/\/+$/, '')}/${relPath.replace(/^\/+/, '')}`;
}
