diff options
| author | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
|---|---|---|
| committer | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
| commit | bce557cc2dc767628bed6aac87301a1be7c5431b (patch) | |
| tree | b51a051228d01fe3306cd7626d4a96768aadb944 /node_modules/@jet-app/app-store/tmp/src/controllers/room | |
init commit
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/controllers/room')
| -rw-r--r-- | node_modules/@jet-app/app-store/tmp/src/controllers/room/room-page-intent-controller.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/controllers/room/room-page-intent-controller.js b/node_modules/@jet-app/app-store/tmp/src/controllers/room/room-page-intent-controller.js new file mode 100644 index 0000000..a414856 --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/controllers/room/room-page-intent-controller.js @@ -0,0 +1,29 @@ +import { withActiveIntent } from "../../foundation/dependencies/active-intent"; +import { fetchData } from "../../foundation/media/network"; +import { roomPageRoutes as routes, makeCanonicalRoomPageUrl } from "../../common/room/room-common"; +import { createRoomRequest } from "../../common/room/room-request"; +import { renderRoomPage } from "../../common/room/room-page"; +import { injectWebNavigation } from "../../common/web-navigation/inject-web-navigation"; +import { injectSEOData } from "../../api/models/web-renderable-page"; +import { validateFcId } from "../../foundation/media/util"; +export const RoomPageIntentController = { + $intentKind: "RoomPageIntent", + routes, + async perform(intent, objectGraphWithoutActiveIntent) { + return await withActiveIntent(objectGraphWithoutActiveIntent, intent, async (objectGraph) => { + var _a; + // See: https://github.pie.apple.com/its/Jingle/blob/d2d051c9ef2891f72d5f02f5bbbf2d7748afa7b9/MZStoreComponents/src/main/java/com/apple/jingle/app/store/editorial/SFEditorialHelper.java#L293 + validateFcId(objectGraph, intent.id); + const mediaApiRequest = createRoomRequest(objectGraph, intent.id); + const response = await fetchData(objectGraph, mediaApiRequest); + const page = renderRoomPage(objectGraph, response); + page.canonicalURL = makeCanonicalRoomPageUrl(objectGraph, intent); + if (objectGraph.client.isWeb) { + injectWebNavigation(objectGraph, page, intent.platform); + injectSEOData(page, (_a = objectGraph.seo) === null || _a === void 0 ? void 0 : _a.getSEODataForRoomPage(objectGraph, page, response)); + } + return page; + }); + }, +}; +//# sourceMappingURL=room-page-intent-controller.js.map
\ No newline at end of file |
