mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 09:11:21 +10:00
feat: uninstall commands, new R UI
This commit is contained in:
@ -18,13 +18,15 @@ export const ImportVersion = type({
|
||||
name: "string?",
|
||||
|
||||
platform: "string",
|
||||
setup: "string = ''",
|
||||
setupArgs: "string = ''",
|
||||
onlySetup: "boolean = false",
|
||||
delta: "boolean = false",
|
||||
umuId: "string = ''",
|
||||
|
||||
install: "string?",
|
||||
installArgs: "string?",
|
||||
launches: LaunchCommands,
|
||||
uninstall: "string?",
|
||||
uninstallArgs: "string?",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
export default defineEventHandler(async (h3) => {
|
||||
@ -56,10 +58,10 @@ export default defineEventHandler(async (h3) => {
|
||||
}
|
||||
|
||||
if (body.onlySetup) {
|
||||
if (!body.setup)
|
||||
if (!body.install)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
message: 'Setup required in "setup mode".',
|
||||
message: 'Install required in "setup mode".',
|
||||
});
|
||||
} else {
|
||||
if (!body.delta && body.launches.length == 0)
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
import aclManager from "~/server/internal/acls"
|
||||
import prisma from "~/server/internal/db/database";
|
||||
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, ["import:version:read"]);
|
||||
if(!allowed) throw createError({statusCode: 403});
|
||||
|
||||
const userPlatforms = await prisma.userPlatform.findMany({});
|
||||
|
||||
return userPlatforms;
|
||||
})
|
||||
Reference in New Issue
Block a user