Files
NightSpire/web-next/lib/realm.ts
T
Inna 8da22ba70f web-next: página /novawow-realm (información del reino)
Ruta con el markup del tema: título «Reino - <NOMBRE>» (nombre tomado de
acore_auth.realmlist con LIMIT 1, por si hay varios reinos; lib/realm.ts
getRealmName) y dos columnas realm-information-half con Rates y Horarios.
force-dynamic + generateMetadata con el nombre del reino.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 12:35:06 +00:00

15 lines
420 B
TypeScript

import type { RowDataPacket } from 'mysql2'
import { db, DB } from './db'
/** Nombre del reino desde acore_auth.realmlist (LIMIT 1, por si hay varios). */
export async function getRealmName(): Promise<string> {
try {
const [rows] = await db(DB.auth).query<RowDataPacket[]>(
'SELECT name FROM realmlist ORDER BY id LIMIT 1',
)
return rows[0]?.name || 'NovaWoW'
} catch {
return 'NovaWoW'
}
}