Google 계정 로그인 연동 추가
This commit is contained in:
@@ -5,7 +5,7 @@ import { createError } from 'h3'
|
||||
/**
|
||||
* 회원 프로필 조회 API
|
||||
* @param {import('h3').H3Event} event - 요청 이벤트
|
||||
* @returns {Promise<{ id: string, email: string, username: string, avatarUrl: string, createdAt: string, updatedAt: string, lastSeenAt: string | null, previousLastSeenAt: string | null, previousLastSeenIp: string, commentCount: number }>} 회원 프로필
|
||||
* @returns {Promise<{ id: string, email: string, username: string, avatarUrl: string, googleEmail: string, googleName: string, googleAvatarUrl: string, googleLinkedAt: string | null, createdAt: string, updatedAt: string, lastSeenAt: string | null, previousLastSeenAt: string | null, previousLastSeenIp: string, commentCount: number }>} 회원 프로필
|
||||
*/
|
||||
export default defineEventHandler(async (event) => {
|
||||
const session = await requireMemberSession(event)
|
||||
@@ -23,6 +23,10 @@ export default defineEventHandler(async (event) => {
|
||||
email: user.email,
|
||||
username: user.username,
|
||||
avatarUrl: user.avatarUrl || '',
|
||||
googleEmail: user.googleEmail || '',
|
||||
googleName: user.googleName || '',
|
||||
googleAvatarUrl: user.googleAvatarUrl || '',
|
||||
googleLinkedAt: user.googleLinkedAt ? user.googleLinkedAt.toISOString() : null,
|
||||
createdAt: user.createdAt.toISOString(),
|
||||
updatedAt: user.updatedAt.toISOString(),
|
||||
lastSeenAt: user.lastSeenAt ? user.lastSeenAt.toISOString() : null,
|
||||
|
||||
Reference in New Issue
Block a user