fix(housekeeping): connect hotel asset ownership
This commit is contained in:
1 parent
abc707cfb2
commit
020c06f172
3 files changed
+13
-2
No files matched your search
@@ -3,6 +3,7 @@ import { economyMigrationEntries } from "../../migration/economy";
|
||||
import { hotelMigrationEntries } from "../../migration/hotel";
|
||||
import { HOUSEKEEPING_ROUTE_HANDLERS } from "../../route-handlers";
|
||||
import { hotelManifest } from "./manifest";
|
||||
import { HOTEL_ASSET_QUERY_OWNERSHIP } from "./queries/assets";
|
||||
import {
|
||||
HOTEL_ASSET_CANONICAL_ROUTES,
|
||||
HOTEL_PRIMARY_ROUTE_IDS,
|
||||
@@ -55,6 +56,11 @@ describe("Hotel primary routes", () => {
|
||||
});
|
||||
|
||||
it("keeps badge and soundtrack ownership canonical in Economy", () => {
|
||||
expect(HOTEL_ASSET_CANONICAL_ROUTES.map((asset) => asset.routeId)).toEqual([
|
||||
HOTEL_ASSET_QUERY_OWNERSHIP.badges,
|
||||
HOTEL_ASSET_QUERY_OWNERSHIP.sounds,
|
||||
]);
|
||||
|
||||
for (const asset of HOTEL_ASSET_CANONICAL_ROUTES) {
|
||||
const entry = economyMigrationEntries.find(
|
||||
(candidate) => candidate.legacyPath === asset.legacyPath,
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
type CanonicalHousekeepingHref,
|
||||
type HousekeepingRouteDefinition,
|
||||
} from "../../foundation/contracts";
|
||||
import { HOTEL_ASSET_QUERY_OWNERSHIP } from "./queries/assets";
|
||||
|
||||
export const HOTEL_ROUTE_GROUPS = ["rooms", "navigation", "radio"] as const;
|
||||
export type HotelRouteGroup = (typeof HOTEL_ROUTE_GROUPS)[number];
|
||||
@@ -88,12 +89,12 @@ export function hotelRouteGroup(id: HotelPrimaryRouteId): HotelRouteGroup {
|
||||
export const HOTEL_ASSET_CANONICAL_ROUTES = Object.freeze([
|
||||
Object.freeze({
|
||||
legacyPath: "/admin/badges",
|
||||
routeId: "economy.rewards.badges",
|
||||
routeId: HOTEL_ASSET_QUERY_OWNERSHIP.badges,
|
||||
href: "/ase/economy/rewards/badges",
|
||||
}),
|
||||
Object.freeze({
|
||||
legacyPath: "/admin/sounds",
|
||||
routeId: "economy.rewards.sounds",
|
||||
routeId: HOTEL_ASSET_QUERY_OWNERSHIP.sounds,
|
||||
href: "/ase/economy/rewards/sounds",
|
||||
}),
|
||||
] as const);
|
||||
@@ -23,6 +23,10 @@ const SERVER_CAPABILITY_CONTEXT =
|
||||
const PERMISSIONS_ADAPTER = "src/lib/permissions";
|
||||
const DOMAIN_MODULE_ROOT = "src/features/housekeeping/domains";
|
||||
const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
|
||||
[
|
||||
"src/features/housekeeping/domains/hotel/routes.ts",
|
||||
new Set(["src/features/housekeeping/domains/hotel/queries/assets"]),
|
||||
],
|
||||
[
|
||||
"src/features/housekeeping/domains/people/commands/community-commands.ts",
|
||||
new Set(["src/features/housekeeping/domains/people/services/mutations"]),
|
||||
|
||||
Reference in new issue
Block a user