gameflow-deck/src/bun/api/games/collections.ts
Simeon Radivoev 38cb752552
feat: Implemented public plugin system accessible from the store.
feat: Implemented external ryujinx integration plugin
refactor: moved sdk types and schemas to own workspace package
fix: Fixed emulator launch with no game
2026-05-10 02:21:01 +03:00

16 lines
No EOL
643 B
TypeScript

import Elysia, { status } from "elysia";
import { plugins } from "../app";
import { FrontEndCollection } from "@simeonradivoev/gameflow-sdk/shared";
export default new Elysia()
.get('/collections', async () =>
{
const collections: FrontEndCollection[] = [];
await plugins.hooks.games.fetchCollections.promise({ collections });
return collections;
}).get('/collection/:source/:id', async ({ params: { source, id } }) =>
{
const collection = await plugins.hooks.games.fetchCollection.promise({ source, id });
if (!collection) return status("Not Found");
return collection;
});