diff --git a/BE/src/users/users.controller.ts b/BE/src/users/users.controller.ts index b33266f..dc1b6fa 100644 --- a/BE/src/users/users.controller.ts +++ b/BE/src/users/users.controller.ts @@ -32,4 +32,4 @@ export class UsersController { async validateNickname(@Query('nickname') nickname: string): Promise { return this.usersService.isUniqueNickname(nickname); } -} +} \ No newline at end of file diff --git a/BE/src/users/users.service.ts b/BE/src/users/users.service.ts index 5057afb..59248ca 100644 --- a/BE/src/users/users.service.ts +++ b/BE/src/users/users.service.ts @@ -78,9 +78,9 @@ export class UsersService { return selectedUser; } - async isNormalImage(image_url: string): Promise { + async isNormalImage(image: Express.Multer.File): Promise { const THRESHOLD = 0.5; - const response = await this.requestClovaGreenEye(image_url); + const response = await this.requestClovaGreenEye(image); const result = response.images[0].result; const message = response.images[0].message; if (message !== 'SUCCESS') { @@ -92,7 +92,7 @@ export class UsersService { return isNormal; } - async requestClovaGreenEye(image_url: string): Promise { + async requestClovaGreenEye(image: Express.Multer.File): Promise { const APIURL = this.config.get('GREENEYE_URL'); const CLIENT_SECRET = this.config.get('GREENEYE_SECRET'); const UUID = v4(); @@ -110,7 +110,7 @@ export class UsersService { images: [ { name: `${UUID}_profile`, - url: image_url, + data: image.buffer.toString('base64'), }, ], }),