azures04 587146d322 Initial project structure and core files
Add base project files including environment example, license, README, .gitignore, error classes, ESLint config, database modules, texture assets, repositories, routes, schemas, services, and server entry point. This establishes the foundational structure for a Yggdrasil-compatible REST API with modular error handling, database setup, and route organization.
2026-01-05 04:42:39 +01:00

22 lines
780 B
JavaScript

const z = require("zod")
module.exports = {
POST: {
body: z.object({
accessToken: z.string()
.min(1, { message: "Access Token is required." }),
selectedProfile: z.string()
.length(32, { message: "Selected Profile must be a valid UUID without dashes." })
.regex(/^[0-9a-fA-F]+$/, { message: "Selected Profile must be hexadecimal." }),
serverId: z.string()
.min(1, { message: "Server ID is required." })
.max(42, { message: "Server ID is too long." })
}),
error: {
code: 400,
message: "Missing or invalid parameters.",
errorFormat: "SessionError",
errorName: "Forbidden"
}
}
}