UPDATE: monster bar
Some checks failed
Gitea Auto Deploy / Deploy-Container (push) Failing after 1m36s

This commit is contained in:
2025-07-25 09:20:39 +07:00
parent 604cf1ceec
commit 487c29def1
133 changed files with 841207 additions and 16695 deletions

View File

@@ -0,0 +1,18 @@
import { NextRequest, NextResponse } from 'next/server'
import { loadAS } from '@/lib/loader'
export async function GET(
req: NextRequest,
{ params }: { params: Promise<{ id: string, locale: string }> }
) {
const { id, locale } = await params
const asData = await loadAS([id], locale)
const as = asData[id]
if (!as) {
return NextResponse.json({ error: 'AS info not found' }, { status: 404 })
}
return NextResponse.json(as)
}

View File

@@ -0,0 +1,20 @@
import { loadAS } from "@/lib/loader";
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest, { params }: { params: Promise<{ locale: string }> }) {
try {
const body = await request.json();
const asIds = body.asIds as string[];
const { locale } = await params;
if (!Array.isArray(asIds) || asIds.some(id => typeof id !== 'string')) {
return NextResponse.json({ error: 'Invalid asIds' }, { status: 400 });
}
const asData = await loadAS(asIds, locale);
return NextResponse.json(asData);
} catch {
return NextResponse.json({ error: 'Failed to load as data' }, { status: 500 });
}
}

View File

@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server'
import { loadCharacters } from '@/lib/characterLoader'
import { loadCharacters } from '@/lib/loader'
export async function GET(
req: NextRequest,

View File

@@ -1,4 +1,4 @@
import { loadCharacters } from "@/lib/characterLoader";
import { loadCharacters } from "@/lib/loader";
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest, { params }: { params: Promise<{ locale: string }> }) {

View File

@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server'
import { loadLightcones } from '@/lib/lighconeLoader'
import { loadLightcones } from '@/lib/loader'
export async function GET(
req: NextRequest,

View File

@@ -1,4 +1,4 @@
import { loadLightcones } from "@/lib/lighconeLoader";
import { loadLightcones } from "@/lib/loader";
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest, { params }: { params: Promise<{ locale: string }> }) {

View File

@@ -0,0 +1,18 @@
import { NextRequest, NextResponse } from 'next/server'
import { loadMOC } from '@/lib/loader'
export async function GET(
req: NextRequest,
{ params }: { params: Promise<{ id: string, locale: string }> }
) {
const { id, locale } = await params
const mocData = await loadMOC([id], locale)
const moc = mocData[id]
if (!moc) {
return NextResponse.json({ error: 'MOC info not found' }, { status: 404 })
}
return NextResponse.json(moc)
}

View File

@@ -0,0 +1,20 @@
import { loadMOC } from "@/lib/loader";
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest, { params }: { params: Promise<{ locale: string }> }) {
try {
const body = await request.json();
const mocIds = body.mocIds as string[];
const { locale } = await params;
if (!Array.isArray(mocIds) || mocIds.some(id => typeof id !== 'string')) {
return NextResponse.json({ error: 'Invalid mocIds' }, { status: 400 });
}
const mocData = await loadMOC(mocIds, locale);
return NextResponse.json(mocData);
} catch {
return NextResponse.json({ error: 'Failed to load moc data' }, { status: 500 });
}
}

View File

@@ -0,0 +1,18 @@
import { NextRequest, NextResponse } from 'next/server'
import { loadPF } from '@/lib/loader'
export async function GET(
req: NextRequest,
{ params }: { params: Promise<{ id: string, locale: string }> }
) {
const { id, locale } = await params
const pfData = await loadPF([id], locale)
const pf = pfData[id]
if (!pf) {
return NextResponse.json({ error: 'PF info not found' }, { status: 404 })
}
return NextResponse.json(pf)
}

View File

@@ -0,0 +1,20 @@
import { loadPF } from "@/lib/loader";
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest, { params }: { params: Promise<{ locale: string }> }) {
try {
const body = await request.json();
const pfIds = body.pfIds as string[];
const { locale } = await params;
if (!Array.isArray(pfIds) || pfIds.some(id => typeof id !== 'string')) {
return NextResponse.json({ error: 'Invalid pfIds' }, { status: 400 });
}
const pfData = await loadPF(pfIds, locale);
return NextResponse.json(pfData);
} catch {
return NextResponse.json({ error: 'Failed to load pf data' }, { status: 500 });
}
}

View File

@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server'
import { loadRelics } from '@/lib/relicLoader'
import { loadRelics } from '@/lib/loader'
export async function GET(
req: NextRequest,

View File

@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from "next/server";
import { loadRelics } from "@/lib/relicLoader";
import { loadRelics } from "@/lib/loader";
export async function POST(request: NextRequest, { params }: { params: Promise<{ locale: string }> }) {
try {

View File

@@ -1,4 +1,4 @@
import { loadConfigMaze } from "@/lib/configMazeLoader";
import { loadConfigMaze } from "@/lib/loader";
import { NextResponse } from "next/server";
export async function GET() {

View File

@@ -1,4 +1,4 @@
import { loadMainAffix } from "@/lib/affixLoader";
import { loadMainAffix } from "@/lib/loader";
import { NextResponse } from "next/server";
export async function GET() {

View File

@@ -1,4 +1,4 @@
import { loadSubAffix } from "@/lib/affixLoader";
import { loadSubAffix } from "@/lib/loader";
import { NextResponse } from "next/server";
export async function GET() {