mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
9 lines
370 B
TypeScript
9 lines
370 B
TypeScript
import { defineClientEventHandler } from "~/server/internal/clients/event-handler";
|
|
import userLibraryManager from "~/server/internal/userlibrary";
|
|
|
|
export default defineClientEventHandler(async (_h3, { fetchUser }) => {
|
|
const user = await fetchUser();
|
|
const library = await userLibraryManager.fetchLibrary(user.id);
|
|
return library.entries.map((e) => e.game);
|
|
});
|