From 5919ba92f138a62b9249982824fd6da2dab07b33 Mon Sep 17 00:00:00 2001 From: vigdorov Date: Sun, 2 Aug 2020 22:55:18 +0300 Subject: [PATCH] HOT-FIX POST --- src/store/store.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/store.service.ts b/src/store/store.service.ts index 5df3212..a39522c 100644 --- a/src/store/store.service.ts +++ b/src/store/store.service.ts @@ -31,7 +31,7 @@ export class StoreService { } async create(api: string, store: StoreRequest): Promise { - const searchStore = await this.findOne(api, store.key); + const searchStore = await this.storeModel(api).findOne({key: store.key}); if (searchStore) { throw new ConflictException(`Api key "${store.key}" is already taken`);