feat: Implemented external ryujinx integration plugin refactor: moved sdk types and schemas to own workspace package fix: Fixed emulator launch with no game
16 lines
No EOL
643 B
TypeScript
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;
|
|
}); |