mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 09:11:21 +10:00
* feat: start of library backends * feat: update backend routes and create initializer * feat: add legacy library creation * fix: resolve frontend type errors * fix: runtime errors * fix: lint
This commit is contained in:
@ -6,5 +6,10 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!allowed) throw createError({ statusCode: 403 });
|
||||
|
||||
const unimportedGames = await libraryManager.fetchAllUnimportedGames();
|
||||
return { unimportedGames };
|
||||
const iterableUnimportedGames = Object.entries(unimportedGames)
|
||||
.map(([libraryId, gameArray]) =>
|
||||
gameArray.map((e) => ({ game: e, library: libraryId })),
|
||||
)
|
||||
.flat();
|
||||
return { unimportedGames: iterableUnimportedGames };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user