mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 08:12:40 +10:00
metadata engine
This commit is contained in:
12
server/api/v1/game/search.get.ts
Normal file
12
server/api/v1/game/search.get.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const query = getQuery(h3);
|
||||
const search = query["q"]?.toString();
|
||||
if (!search) throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "Missing search param"
|
||||
});
|
||||
|
||||
const results = await h3.context.metadataHandler.search(search);
|
||||
|
||||
return results;
|
||||
});
|
||||
Reference in New Issue
Block a user