From 8352024bb5f0ddbcb1e5e691cb0e52db5550e422 Mon Sep 17 00:00:00 2001 From: vigdorov Date: Mon, 7 Sep 2020 20:38:24 +0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX.=20=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/store.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/store.service.ts b/src/store/store.service.ts index 1a65e1d..3b9711c 100644 --- a/src/store/store.service.ts +++ b/src/store/store.service.ts @@ -140,7 +140,7 @@ export class StoreService { const user = await this.loadUserByToken(access_token); if (!user.is_admin && user.login !== searchStore.author) { - throw new UnauthorizedException('Доступ запрещен'); + throw new NotFoundException(`Not found api key "${omitProps.key}"`); } const store = { @@ -182,7 +182,7 @@ export class StoreService { if (user.is_admin || user.login === store.author || !store.hide) { return store; } - throw new UnauthorizedException('Доступ запрещен'); + throw new NotFoundException(`Not found api key "${key}"`); } async removeOne(api: string, key: string, access_token: string): Promise { @@ -192,7 +192,7 @@ export class StoreService { const user = await this.loadUserByToken(access_token); if (!user.is_admin && user.login !== searchStore.author) { - throw new UnauthorizedException('Доступ запрещен'); + throw new NotFoundException(`Not found api key "${key}"`); } await this.storeModel(api).deleteOne({key});