From 860334a86b7c22a3732ee3a03fc89d9ffce2ceef Mon Sep 17 00:00:00 2001 From: chyoo Date: Thu, 9 Jul 2026 15:24:15 +0900 Subject: [PATCH] modify avatar url.. --- src/chat/chat.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/chat/chat.service.ts b/src/chat/chat.service.ts index 583dc5d..ae8501d 100644 --- a/src/chat/chat.service.ts +++ b/src/chat/chat.service.ts @@ -61,6 +61,7 @@ const AI_CHAT_CONTEXT_MESSAGE_LIMIT = 6; @Injectable() export class ChatService { private readonly authServerUrl: string; + private readonly authPublicUrl: string; constructor( private readonly authService: AuthService, @@ -71,6 +72,9 @@ export class ChatService { this.authServerUrl = this.configService .get('AUTH_SERVER_URL', 'http://localhost:4100') .replace(/\/$/, ''); + this.authPublicUrl = this.configService + .get('AUTH_PUBLIC_URL', this.authServerUrl) + .replace(/\/$/, ''); } async listThreads(accessToken: string | undefined, query: ListChatThreadsDto) { @@ -977,11 +981,11 @@ export class ChatService { if (!user) return null; if (user.authUserId) { - return `${this.authServerUrl}/auth/users/${user.authUserId}/avatar`; + return `${this.authPublicUrl}/auth/users/${user.authUserId}/avatar`; } if (user.email) { - return `${this.authServerUrl}/auth/users/avatar?email=${encodeURIComponent(user.email)}`; + return `${this.authPublicUrl}/auth/users/avatar?email=${encodeURIComponent(user.email)}`; } return null;