diff --git a/src/modules/Users/UserInteractor.ts b/src/modules/Users/UserInteractor.ts index 2da4399..846c0cb 100644 --- a/src/modules/Users/UserInteractor.ts +++ b/src/modules/Users/UserInteractor.ts @@ -4,11 +4,14 @@ import HttpError from '../../utils/HttpError' import * as Service from './UserService' import { deleteFile } from '../../utils/file' import dbErrorHandler from '../../utils/dbErrorHandler' +import { getObjectUrl } from '../AWS-Bucket/UploadService' export async function findUserProfile(username: string) { const user = await Service.findByEmailOrUsername(username) if (!user) throw new HttpError('User not found', 404) delete user.password + user.avatar = getObjectUrl(user.avatar) + return user }