페이지 형식 선택과 접속 IP 기록 수정 v1.5.7
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { z } from 'zod'
|
||||
import { createError, getRequestIP, readBody } from 'h3'
|
||||
import { createError, readBody } from 'h3'
|
||||
import bcrypt from 'bcrypt'
|
||||
import { safeCompare, setAdminSession } from '../../../../utils/admin-auth'
|
||||
import { getAdminUserByEmail, getMemberBootstrapState, touchUserActivity, upsertBootstrapOwner } from '../../../../repositories/member-repository'
|
||||
import { setMemberSession } from '../../../../utils/member-auth'
|
||||
import { getRuntimeEnvValue } from '../../../../utils/runtime-env'
|
||||
import { getClientIp } from '../../../../utils/request-ip'
|
||||
|
||||
const loginSchema = z.object({
|
||||
email: z.string().email(),
|
||||
@@ -86,7 +87,7 @@ export default defineEventHandler(async (event) => {
|
||||
})
|
||||
await touchUserActivity({
|
||||
userId: adminUser.id,
|
||||
ip: String(getRequestIP(event) || '')
|
||||
ip: getClientIp(event)
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user