mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-19 19:21:12 +10:00
feat: partial user platform support + statusMessage -> message
This commit is contained in:
@ -8,13 +8,13 @@ export default defineClientEventHandler(async (h3, { fetchUser }) => {
|
||||
if (!id)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "ID required in route params",
|
||||
message: "ID required in route params",
|
||||
});
|
||||
|
||||
const body = await readBody(h3);
|
||||
const gameId = body.id;
|
||||
if (!gameId)
|
||||
throw createError({ statusCode: 400, statusMessage: "Game ID required" });
|
||||
throw createError({ statusCode: 400, message: "Game ID required" });
|
||||
|
||||
return await userLibraryManager.collectionAdd(gameId, id, user.id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user