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>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user