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.
16 lines
416 B
JavaScript
16 lines
416 B
JavaScript
const z = require("zod")
|
|
|
|
module.exports = {
|
|
GET: {
|
|
params: z.object({
|
|
uuid: z.string().length(32).regex(/^[0-9a-fA-F]+$/, { message: "Invalid UUID (no dashes expected)." })
|
|
}),
|
|
query: z.object({
|
|
unsigned: z.enum(["true", "false"]).optional()
|
|
}),
|
|
error: {
|
|
code: 204,
|
|
message: "No content (UUID not found)"
|
|
}
|
|
}
|
|
} |