Renombrar /login -> /log-in en toda la web (/login da 404)

Mueve la página de login a /log-in y actualiza todas las referencias (enlace
CONECTAR del header y los redirect de auth de ~45 páginas). /login ahora da 404.
La API /api/auth/login no se toca (solo la ruta de página).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 21:03:31 +00:00
parent 14125dbd72
commit 20e1d5a6b5
49 changed files with 67 additions and 52 deletions
@@ -43,7 +43,7 @@ export function ActivateClient({ hash }: { hash: string }) {
<> <>
<span className="ok-form-response">{t('success')}</span> <span className="ok-form-response">{t('success')}</span>
<p style={{ marginTop: 16 }}> <p style={{ marginTop: 16 }}>
<Link href="/login">{t('goLogin')}</Link> <Link href="/log-in">{t('goLogin')}</Link>
</p> </p>
</> </>
)} )}
+1 -1
View File
@@ -13,7 +13,7 @@ export default async function AdminForumPage({ params }: { params: Promise<{ loc
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const groups = await listCategoriesWithForums() const groups = await listCategoriesWithForums()
return ( return (
+1 -1
View File
@@ -13,7 +13,7 @@ export default async function AdminGoldPage({ params }: { params: Promise<{ loca
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const options = await listGoldOptions() const options = await listGoldOptions()
return ( return (
+1 -1
View File
@@ -13,7 +13,7 @@ export default async function AdminNewsPage({ params }: { params: Promise<{ loca
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const news = await listNews() const news = await listNews()
return ( return (
+1 -1
View File
@@ -11,7 +11,7 @@ export default async function AdminPage({ params }: { params: Promise<{ locale:
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const items: { href: string; label: string; icon: string }[] = [ const items: { href: string; label: string; icon: string }[] = [
+1 -1
View File
@@ -13,7 +13,7 @@ export default async function AdminPricesPage({ params }: { params: Promise<{ lo
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const prices = await getAllPrices() const prices = await getAllPrices()
return ( return (
+1 -1
View File
@@ -13,7 +13,7 @@ export default async function AdminPromoPage({ params }: { params: Promise<{ loc
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const codes = await listPromoCodes() const codes = await listPromoCodes()
return ( return (
+1 -1
View File
@@ -13,7 +13,7 @@ export default async function AdminRecruitPage({ params }: { params: Promise<{ l
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const rewards = await listRecruitRewards() const rewards = await listRecruitRewards()
return ( return (
+1 -1
View File
@@ -12,7 +12,7 @@ export default async function AdminUsersPage({ params }: { params: Promise<{ loc
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
return ( return (
<PageShell title={t('users')}> <PageShell title={t('users')}>
+1 -1
View File
@@ -13,7 +13,7 @@ export default async function AdminVotesPage({ params }: { params: Promise<{ loc
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Admin') const t = await getTranslations('Admin')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!(await isAdmin(session))) redirect({ href: '/', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale })
const sites = await listVoteSites() const sites = await listVoteSites()
return ( return (
+1 -1
View File
@@ -102,7 +102,7 @@ export default async function BanHistoryPage({ params }: { params: Promise<{ loc
const t = await getTranslations('History') const t = await getTranslations('History')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const { bans, mutes } = await getSanctions(session.accountId!, session.bnetId) const { bans, mutes } = await getSanctions(session.accountId!, session.bnetId)
+1 -1
View File
@@ -12,7 +12,7 @@ export default async function BattlepayPage({ params }: { params: Promise<{ loca
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Battlepay') const t = await getTranslations('Battlepay')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const orders = await getPendingOrders(session.accountId ?? 0) const orders = await getPendingOrders(session.accountId ?? 0)
+1 -1
View File
@@ -12,7 +12,7 @@ export default async function ChangeEmailPage({ params }: { params: Promise<{ lo
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('ChangeEmail') const t = await getTranslations('ChangeEmail')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
return ( return (
<PageShell title={t('title')}> <PageShell title={t('title')}>
@@ -33,7 +33,7 @@ export default async function ChangeFactionCharacterPage({ params }: { params: P
setRequestLocale(locale) setRequestLocale(locale)
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getChangeFactionPrice()]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getChangeFactionPrice()])
@@ -42,7 +42,7 @@ export function ChangePasswordForm() {
setDone(true) setDone(true)
setMessage({ ok: true, text: t('success') }) setMessage({ ok: true, text: t('success') })
setTimeout(() => { setTimeout(() => {
router.push('/login') router.push('/log-in')
router.refresh() router.refresh()
}, 2500) }, 2500)
} else { } else {
@@ -12,7 +12,7 @@ export default async function ChangePasswordPage({ params }: { params: Promise<{
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('ChangePassword') const t = await getTranslations('ChangePassword')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
return ( return (
@@ -21,7 +21,7 @@ export default async function ChangeRaceCharacterPage({ params }: { params: Prom
setRequestLocale(locale) setRequestLocale(locale)
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getChangeRacePrice()]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getChangeRacePrice()])
+18 -3
View File
@@ -1,17 +1,32 @@
import type { Metadata } from 'next'
import { getTranslations, setRequestLocale } from 'next-intl/server' import { getTranslations, setRequestLocale } from 'next-intl/server'
import { PageShell } from '@/components/PageShell' import { PageShell } from '@/components/PageShell'
import { RegisterForm } from './RegisterForm' import { RegisterForm } from './RegisterForm'
export default async function RegisterPage({ params }: { params: Promise<{ locale: string }> }) { export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: 'Register' })
return { title: t('title') }
}
export default async function CreateAccountPage({ params }: { params: Promise<{ locale: string }> }) {
const { locale } = await params const { locale } = await params
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Register') const t = await getTranslations('Register')
return ( return (
<PageShell title={t('title')}> <PageShell title={t('title')}>
<div className="box-content"> <div className="box-content" tabIndex={-1}>
<div className="body-box-content info-box-light justified"> <div className="body-box-content info-box-light justified">
<p>{t('info')}</p> <p>{t('bnetType')}</p>
<p>{t('passwordRule')}</p>
<p>{t('emailRule')}</p>
<br />
<p>{t('activation1')}</p>
<p>{t('activation2')}</p>
<p>
<i className="fas fa-exclamation-triangle"></i> {t('loginHint')}
</p>
</div> </div>
</div> </div>
<div className="box-content"> <div className="box-content">
@@ -21,7 +21,7 @@ export default async function CustomizeCharacterPage({ params }: { params: Promi
setRequestLocale(locale) setRequestLocale(locale)
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getCustomizePrice()]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getCustomizePrice()])
+1 -1
View File
@@ -21,7 +21,7 @@ export default async function DPointsPage({ params }: { params: Promise<{ locale
const t = await getTranslations('Points') const t = await getTranslations('Points')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
// SumUp no tiene webhooks: reconciliamos aquí los pagos SumUp pendientes de // SumUp no tiene webhooks: reconciliamos aquí los pagos SumUp pendientes de
@@ -23,7 +23,7 @@ export default async function GoldCharacterPage({ params }: { params: Promise<{
setRequestLocale(locale) setRequestLocale(locale)
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, options] = await Promise.all([getGameCharacters(session.accountId!), getGoldOptions()]) const [chars, options] = await Promise.all([getGameCharacters(session.accountId!), getGoldOptions()])
@@ -21,7 +21,7 @@ export default async function LevelUpCharacterPage({ params }: { params: Promise
setRequestLocale(locale) setRequestLocale(locale)
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getLevelUpPrice()]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getLevelUpPrice()])
@@ -22,7 +22,7 @@ export default async function LoginPage({ params }: { params: Promise<{ locale:
</p> </p>
<br /> <br />
<p> <p>
{t('newHere')} <Link href="/register">{t('createAccount')}</Link> {t('newHere')} <Link href="/create-account">{t('createAccount')}</Link>
</p> </p>
<br /> <br />
<p className="grey-info2">{t('publicNote')}</p> <p className="grey-info2">{t('publicNote')}</p>
+1 -1
View File
@@ -36,7 +36,7 @@ export default async function AccountPage({ params }: { params: Promise<{ locale
const t = await getTranslations('Account') const t = await getTranslations('Account')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
// Acredita cualquier pago SumUp pendiente de esta cuenta (SumUp no tiene // Acredita cualquier pago SumUp pendiente de esta cuenta (SumUp no tiene
@@ -32,7 +32,7 @@ export default async function PointsHistoryPage({ params }: { params: Promise<{
const t = await getTranslations('History') const t = await getTranslations('History')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [movements, balances] = await Promise.all([ const [movements, balances] = await Promise.all([
+1 -1
View File
@@ -21,7 +21,7 @@ export default async function PromoCodePage({ params }: { params: Promise<{ loca
const t = await getTranslations('Points') const t = await getTranslations('Points')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const realm = await getRealmName() const realm = await getRealmName()
@@ -33,7 +33,7 @@ export default async function QuestCharacterPage({ params }: { params: Promise<{
const t = await getTranslations('CharService') const t = await getTranslations('CharService')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const chars = await getGameCharacters(session.accountId!) const chars = await getGameCharacters(session.accountId!)
@@ -133,7 +133,7 @@ export default async function RecruitPage({ params }: { params: Promise<{ locale
/> />
) : ( ) : (
<p className="centered"> <p className="centered">
<Link href="/login">{t('loginToClaim')}</Link> <Link href="/log-in">{t('loginToClaim')}</Link>
</p> </p>
)} )}
</div> </div>
@@ -21,7 +21,7 @@ export default async function RenameCharacterPage({ params }: { params: Promise<
setRequestLocale(locale) setRequestLocale(locale)
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getRenamePrice()]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getRenamePrice()])
+1 -1
View File
@@ -21,7 +21,7 @@ export default async function RenameGuildPage({ params }: { params: Promise<{ lo
const t = await getTranslations('Points') const t = await getTranslations('Points')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const guilds = await getGuildMasterGuilds(session.accountId!) const guilds = await getGuildMasterGuilds(session.accountId!)
@@ -30,7 +30,7 @@ export function ResetForm({ token }: { token: string }) {
if (data.success) { if (data.success) {
setDone(true) setDone(true)
setMessage({ ok: true, text: t('success') }) setMessage({ ok: true, text: t('success') })
setTimeout(() => router.push('/login'), 2500) setTimeout(() => router.push('/log-in'), 2500)
} else { } else {
const key = (ERROR_KEYS as readonly string[]).includes(data.error ?? '') ? data.error! : 'genericError' const key = (ERROR_KEYS as readonly string[]).includes(data.error ?? '') ? data.error! : 'genericError'
setMessage({ ok: false, text: t(key) }) setMessage({ ok: false, text: t(key) })
@@ -75,7 +75,7 @@ export function ResetForm({ token }: { token: string }) {
</div> </div>
{done && ( {done && (
<p> <p>
<Link href="/login">{t('goLogin')}</Link> <Link href="/log-in">{t('goLogin')}</Link>
</p> </p>
)} )}
</> </>
@@ -22,7 +22,7 @@ export default async function RestoreCharacterPage({ params }: { params: Promise
const t = await getTranslations('CharService') const t = await getTranslations('CharService')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const chars = await getRestorableCharacters(session.accountId!) const chars = await getRestorableCharacters(session.accountId!)
+1 -1
View File
@@ -23,7 +23,7 @@ export default async function RestoreItemsPage({ params }: { params: Promise<{ l
const t = await getTranslations('CharService') const t = await getTranslations('CharService')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getRestoreItemPrice()]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getRestoreItemPrice()])
@@ -22,7 +22,7 @@ export default async function Security2faLoginPage({ params }: { params: Promise
const t = await getTranslations('Misc') const t = await getTranslations('Misc')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const enabled = session.accountId ? await is2faEnabled(session.accountId) : false const enabled = session.accountId ? await is2faEnabled(session.accountId) : false
@@ -42,7 +42,7 @@ export default async function SecurityHistoryPage({ params }: { params: Promise<
const t = await getTranslations('History') const t = await getTranslations('History')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const bnetEmail = session.bnetEmail || '' const bnetEmail = session.bnetEmail || ''
@@ -15,7 +15,7 @@ export default async function SecurityTokenPage({ params }: { params: Promise<{
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('SecurityToken') const t = await getTranslations('SecurityToken')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
let tokenDate: string | null = null let tokenDate: string | null = null
@@ -14,7 +14,7 @@ export default async function SelectAccountPage({ params }: { params: Promise<{
const t = await getTranslations('SelectAccount') const t = await getTranslations('SelectAccount')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
// Etiqueta visible «15#1» → «WOW1» (mismo criterio que my-account/cabecera). // Etiqueta visible «15#1» → «WOW1» (mismo criterio que my-account/cabecera).
const games = (await getGameAccounts(session.bnetId!)).map((g) => ({ ...g, label: wowAccountLabel(g.username) })) const games = (await getGameAccounts(session.bnetId!)).map((g) => ({ ...g, label: wowAccountLabel(g.username) }))
+1 -1
View File
@@ -23,7 +23,7 @@ export default async function SendGiftPage({ params }: { params: Promise<{ local
const t = await getTranslations('CharService') const t = await getTranslations('CharService')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, catalog] = await Promise.all([getGameCharacters(session.accountId!), getGiftCatalog()]) const [chars, catalog] = await Promise.all([getGameCharacters(session.accountId!), getGiftCatalog()])
+1 -1
View File
@@ -21,7 +21,7 @@ export default async function TradePointsPage({ params }: { params: Promise<{ lo
const t = await getTranslations('Points') const t = await getTranslations('Points')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const chars = await getGameCharacters(session.accountId!) const chars = await getGameCharacters(session.accountId!)
+1 -1
View File
@@ -108,7 +108,7 @@ export default async function TransHistoryPage({ params }: { params: Promise<{ l
const t = await getTranslations('History') const t = await getTranslations('History')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const txs = await getPaymentTransactions(session.accountId!) const txs = await getPaymentTransactions(session.accountId!)
@@ -23,7 +23,7 @@ export default async function TransferCharacterPage({ params }: { params: Promis
const t = await getTranslations('CharService') const t = await getTranslations('CharService')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getTransferPrice()]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getTransferPrice()])
@@ -21,7 +21,7 @@ export default async function TransferDPointsPage({ params }: { params: Promise<
const t = await getTranslations('Points') const t = await getTranslations('Points')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const balance = await getDPointsBalance(session.accountId!) const balance = await getDPointsBalance(session.accountId!)
@@ -14,7 +14,7 @@ export default async function UnstuckPage({ params }: { params: Promise<{ locale
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Services') const t = await getTranslations('Services')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const chars = await getGameCharacters(session.accountId!) const chars = await getGameCharacters(session.accountId!)
+1 -1
View File
@@ -45,7 +45,7 @@ export function ConfirmClient({
<span className="ok-form-response">{t('success')}</span> <span className="ok-form-response">{t('success')}</span>
{showLogin && ( {showLogin && (
<p style={{ marginTop: 16 }}> <p style={{ marginTop: 16 }}>
<Link href="/login">{t('goLogin')}</Link> <Link href="/log-in">{t('goLogin')}</Link>
</p> </p>
)} )}
</> </>
+1 -1
View File
@@ -12,7 +12,7 @@ export async function ReviveServiceContent({ locale }: { locale: string }) {
setRequestLocale(locale) setRequestLocale(locale)
const t = await getTranslations('Services') const t = await getTranslations('Services')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const chars = await getGameCharacters(session.accountId!) const chars = await getGameCharacters(session.accountId!)
+1 -1
View File
@@ -16,7 +16,7 @@ export async function ServicePageContent({ service, locale }: { service: string;
const t = await getTranslations('Paid') const t = await getTranslations('Paid')
const session = await getSession() const session = await getSession()
if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.bnetId) redirect({ href: '/log-in', locale })
if (!session.username) redirect({ href: '/select-account', locale }) if (!session.username) redirect({ href: '/select-account', locale })
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), cfg!.price({})]) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), cfg!.price({})])
+2 -2
View File
@@ -49,7 +49,7 @@ export function SiteHeader({
{loggedIn ? ( {loggedIn ? (
<Link href="/">{t('header.home')}</Link> <Link href="/">{t('header.home')}</Link>
) : ( ) : (
<Link href="/register">{t('header.register')}</Link> <Link href="/create-account">{t('header.register')}</Link>
)} )}
<div className="nav-dropdown"> <div className="nav-dropdown">
@@ -124,7 +124,7 @@ export function SiteHeader({
</div> </div>
</div> </div>
) : ( ) : (
<Link href="/login" className="last"> <Link href="/log-in" className="last">
{t('header.login')} {t('header.login')}
</Link> </Link>
)} )}
+1 -1
View File
@@ -183,5 +183,5 @@ export async function resetPassword(token: string, newPassword: string, confPass
return { success: false, error: 'genericError' } return { success: false, error: 'genericError' }
} }
await db(DB.default).query('UPDATE home_passwordreset SET used = 1 WHERE id = ?', [pr.id]) await db(DB.default).query('UPDATE home_passwordreset SET used = 1 WHERE id = ?', [pr.id])
return { success: true, redirect: '/login' } return { success: true, redirect: '/log-in' }
} }