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
366 B
JavaScript
16 lines
366 B
JavaScript
const z = require("zod")
|
|
|
|
const loginShape = {
|
|
user: z.string().min(1, { message: "Username required" }),
|
|
password: z.string().min(1, { message: "Password required" }),
|
|
version: z.union([z.string(), z.number()]).optional()
|
|
}
|
|
|
|
module.exports = {
|
|
POST: {
|
|
body: z.object(loginShape),
|
|
},
|
|
GET: {
|
|
query: z.object(loginShape)
|
|
}
|
|
} |