HOT-FIX POST
This commit is contained in:
@ -31,7 +31,7 @@ export class StoreService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async create(api: string, store: StoreRequest): Promise<Store> {
|
async create(api: string, store: StoreRequest): Promise<Store> {
|
||||||
const searchStore = await this.findOne(api, store.key);
|
const searchStore = await this.storeModel(api).findOne({key: store.key});
|
||||||
|
|
||||||
if (searchStore) {
|
if (searchStore) {
|
||||||
throw new ConflictException(`Api key "${store.key}" is already taken`);
|
throw new ConflictException(`Api key "${store.key}" is already taken`);
|
||||||
|
|||||||
Reference in New Issue
Block a user