continued migration
This commit is contained in:
@@ -1,124 +1,27 @@
|
||||
import { createTRPCRouter, publicProcedure } from "../utils";
|
||||
import { z } from "zod";
|
||||
import { createTRPCRouter } from "../utils";
|
||||
import { lineageAuthRouter } from "./lineage/auth";
|
||||
import { lineageDatabaseRouter } from "./lineage/database";
|
||||
import { lineageJsonServiceRouter } from "./lineage/json-service";
|
||||
import { lineageMiscRouter } from "./lineage/misc";
|
||||
import { lineagePvpRouter } from "./lineage/pvp";
|
||||
import { lineageMaintenanceRouter } from "./lineage/maintenance";
|
||||
|
||||
export const lineageRouter = createTRPCRouter({
|
||||
// Database management routes (GET)
|
||||
databaseManagement: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for database management
|
||||
return { message: "Database management endpoint" };
|
||||
}),
|
||||
// Authentication
|
||||
auth: lineageAuthRouter,
|
||||
|
||||
// Analytics route (GET)
|
||||
analytics: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for analytics
|
||||
return { message: "Analytics endpoint" };
|
||||
}),
|
||||
// Database Management
|
||||
database: lineageDatabaseRouter,
|
||||
|
||||
// Apple authentication routes (GET)
|
||||
appleAuth: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for Apple authentication
|
||||
return { message: "Apple authentication endpoint" };
|
||||
}),
|
||||
// PvP
|
||||
pvp: lineagePvpRouter,
|
||||
|
||||
// Email login/registration/verification routes (GET/POST)
|
||||
emailLogin: publicProcedure
|
||||
.input(z.object({ email: z.string().email(), password: z.string() }))
|
||||
.mutation(async ({ input }) => {
|
||||
// Implementation for email login
|
||||
return { message: `Email login for ${input.email}` };
|
||||
}),
|
||||
// JSON Service
|
||||
jsonService: lineageJsonServiceRouter,
|
||||
|
||||
emailRegister: publicProcedure
|
||||
.input(z.object({ email: z.string().email(), password: z.string() }))
|
||||
.mutation(async ({ input }) => {
|
||||
// Implementation for email registration
|
||||
return { message: `Email registration for ${input.email}` };
|
||||
}),
|
||||
// Misc (Analytics, Tokens, etc.)
|
||||
misc: lineageMiscRouter,
|
||||
|
||||
emailVerify: publicProcedure
|
||||
.input(z.object({ token: z.string() }))
|
||||
.mutation(async ({ input }) => {
|
||||
// Implementation for email verification
|
||||
return { message: "Email verification endpoint" };
|
||||
}),
|
||||
|
||||
// Google registration route (POST)
|
||||
googleRegister: publicProcedure
|
||||
.input(z.object({
|
||||
googleId: z.string(),
|
||||
email: z.string().email(),
|
||||
name: z.string()
|
||||
}))
|
||||
.mutation(async ({ input }) => {
|
||||
// Implementation for Google registration
|
||||
return { message: `Google registration for ${input.email}` };
|
||||
}),
|
||||
|
||||
// JSON service routes (GET - attacks, conditions, dungeons, enemies, items, misc)
|
||||
attacks: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for attacks data
|
||||
return { message: "Attacks data" };
|
||||
}),
|
||||
|
||||
conditions: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for conditions data
|
||||
return { message: "Conditions data" };
|
||||
}),
|
||||
|
||||
dungeons: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for dungeons data
|
||||
return { message: "Dungeons data" };
|
||||
}),
|
||||
|
||||
enemies: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for enemies data
|
||||
return { message: "Enemies data" };
|
||||
}),
|
||||
|
||||
items: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for items data
|
||||
return { message: "Items data" };
|
||||
}),
|
||||
|
||||
misc: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for miscellaneous data
|
||||
return { message: "Miscellaneous data" };
|
||||
}),
|
||||
|
||||
// Offline secret route (GET)
|
||||
offlineSecret: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for offline secret
|
||||
return { message: "Offline secret endpoint" };
|
||||
}),
|
||||
|
||||
// PvP routes (GET/POST)
|
||||
pvpGet: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for PvP GET
|
||||
return { message: "PvP GET endpoint" };
|
||||
}),
|
||||
|
||||
pvpPost: publicProcedure
|
||||
.input(z.object({ player1: z.string(), player2: z.string() }))
|
||||
.mutation(async ({ input }) => {
|
||||
// Implementation for PvP POST
|
||||
return { message: `PvP battle between ${input.player1} and ${input.player2}` };
|
||||
}),
|
||||
|
||||
// Tokens route (GET)
|
||||
tokens: publicProcedure
|
||||
.query(async () => {
|
||||
// Implementation for tokens
|
||||
return { message: "Tokens endpoint" };
|
||||
}),
|
||||
// Maintenance (Protected)
|
||||
maintenance: lineageMaintenanceRouter,
|
||||
});
|
||||
Reference in New Issue
Block a user