페이지 형식 선택과 접속 IP 기록 수정 v1.5.7

This commit is contained in:
2026-05-26 16:44:52 +09:00
parent a5ae2c3fce
commit e78e09f3fd
15 changed files with 52 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
import bcrypt from 'bcrypt'
import { z } from 'zod'
import { createError, getRequestIP, readBody } from 'h3'
import { createError, readBody } from 'h3'
import { createUser, getUserByEmail, getMemberBootstrapState, isUsernameTaken, touchUserActivity } from '../../repositories/member-repository'
import { verifyAndConsumeEmailOtp } from '../../repositories/email-otp-repository'
import { setMemberSession } from '../../utils/member-auth'
@@ -8,6 +8,7 @@ import { setAdminSession } from '../../utils/admin-auth'
import { isResendConfigured } from '../../utils/resend-mail'
import { getRuntimeEnvValue } from '../../utils/runtime-env'
import { assertSignupUsernameAllowed } from '../../utils/member-username-policy'
import { getClientIp } from '../../utils/request-ip'
const signupSchema = z.object({
username: z.string().trim().min(1),
@@ -112,7 +113,7 @@ export default defineEventHandler(async (event) => {
}
await touchUserActivity({
userId: created.id,
ip: String(getRequestIP(event) || '')
ip: getClientIp(event)
})
return {