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`);