feat(release): front int PK with app-minted GUID EntryKey on the public addressing surface (P11 W5, 11.H)
This commit is contained in:
@@ -14,17 +14,19 @@ namespace DeepDrftPublic.Client.Common;
|
||||
public static class ReleaseRoutes
|
||||
{
|
||||
/// <summary>
|
||||
/// The dedicated detail route for a release: <c>/cuts/{id}</c>, <c>/sessions/{id}</c>, or
|
||||
/// <c>/mixes/{id}</c>. Cut is the default arm so a new medium without an entry here surfaces a
|
||||
/// build-visible gap rather than a silent fallthrough — extend the switch when a fourth medium lands.
|
||||
/// The dedicated detail route for a release: <c>/cuts/{entryKey}</c>, <c>/sessions/{entryKey}</c>,
|
||||
/// or <c>/mixes/{entryKey}</c>. The route carries the release's opaque public EntryKey (Phase 11
|
||||
/// §3e) — never the transparent int PK. Cut is the default arm so a new medium without an entry
|
||||
/// here surfaces a build-visible gap rather than a silent fallthrough — extend the switch when a
|
||||
/// fourth medium lands.
|
||||
/// </summary>
|
||||
public static string DetailHref(long id, ReleaseMedium medium) => medium switch
|
||||
public static string DetailHref(string entryKey, ReleaseMedium medium) => medium switch
|
||||
{
|
||||
ReleaseMedium.Session => $"/sessions/{id}",
|
||||
ReleaseMedium.Mix => $"/mixes/{id}",
|
||||
_ => $"/cuts/{id}",
|
||||
ReleaseMedium.Session => $"/sessions/{entryKey}",
|
||||
ReleaseMedium.Mix => $"/mixes/{entryKey}",
|
||||
_ => $"/cuts/{entryKey}",
|
||||
};
|
||||
|
||||
/// <summary>Convenience overload for call sites holding a <see cref="ReleaseDto"/>.</summary>
|
||||
public static string DetailHref(ReleaseDto release) => DetailHref(release.Id, release.Medium);
|
||||
public static string DetailHref(ReleaseDto release) => DetailHref(release.EntryKey, release.Medium);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user