mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 00:31:25 +10:00
feat(umu id override): add support for overriding UMU id
This commit is contained in:
@ -12,6 +12,7 @@ export default defineEventHandler(async (h3) => {
|
||||
const startup = body.startup;
|
||||
const setup = body.setup ?? "";
|
||||
const delta = body.delta ?? false;
|
||||
const umuId = body.umuId;
|
||||
|
||||
// startup & delta require more complex checking logic
|
||||
if (!gameId || !versionName || !platform)
|
||||
@ -21,6 +22,12 @@ export default defineEventHandler(async (h3) => {
|
||||
"ID, version, platform, setup, and startup (if not in update mode) are required.",
|
||||
});
|
||||
|
||||
if (umuId && typeof umuId !== "string")
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "If specified, UMU ID must be a string.",
|
||||
});
|
||||
|
||||
if (!delta && !startup)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
@ -46,6 +53,7 @@ export default defineEventHandler(async (h3) => {
|
||||
platform,
|
||||
startup,
|
||||
setup,
|
||||
umuId,
|
||||
},
|
||||
delta
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user